Skip to content
Child Frame Read String
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit May 20, 2019
LICENSE Initial commit May 20, 2019 Fall back on wrapping read-string in a terminal environment. Jun 17, 2019
cfrs.el Adjust height to number of lines. Jun 18, 2019
cfrs.png Rename package to cfrs. May 25, 2019

cfrs.el – Child Frame Read String


cfrs.el is a simple alternative to read-string that allows reading input via a small child-frame spawned at the position of the cursor. Its goal is to make the string input interface closer to those used in modern GUI programs and to help the user with having to switch focus from whatever they are doing currently to look at the minibuffer.

There is just one single entry point, cfrs-read, and its interface simple enough to not require further explanation:

(defun cfrs-read (prompt &optional initial-input) ... )

The text in the resulting child-frame can be edited freely, with the caveat that it is meant to fit on a single line - cfrs.el is meant for simple inputs. The input can be confirmed via either C-c C-c or RET.

A runnable example:

(let ((input (cfrs-read "Text: " "Initial Input")))
  (message "Hello %s!" input))

In a terminal environment cfrs will fall back to the default read-string.

You can’t perform that action at this time.