home ~ socials ~ projects ~ rss

emacs- Read from the minibufferr.txt

May 2022

Use read-from-minibuffer to get input from the minibuffer. You don't need to initialize it separately. When calling it, a 'prompt' is required that will show up in front of the text insert area. For example:

(princ (read-from-minibuffer "Search: "))
Output:
the is from the minibuffer

That will launch the minibuffer with a "Search: " prompt and return the text that's typed into it.

I haven't figured out how to read one character at a time like this. The "completion" stuff provides some ways to do that though.

end of line
Share link:
https://www.alanwsmith.com/en/29/zm/wc/cn/?emacs-read-from-the-minibufferr-txt