Let's say I want to provide partial input to an interactive function such as insert-char. For example, I might want to have a command that automatically starts typing GREEK SMALL LETTER or BOX DRAWINGS.
This does not work, because call-interactively exits before insert is called:
(defun insert-box-drawing-char ()
(interactive)
(call-interactively 'insert-char)
(insert "BOX DRAWING"))
How can I provide partial input to an interactive function?
insert-charis coded in C), but it's maybe good to remind readers that bothcompleting-readandread-from-minibufferlet you pass anINITIAL-INPUTargument, and you can position the cursor anywhere within that string, which is inserted in the minibuffer to start with. (Vanilla Emacs considersINITIAL-INPUTto be deprecated forcompleting-read, but that proscription can be ignored.) – Drew Apr 19 '15 at 15:25