I would like to create a quick Emacs macro (with C-x (
) which takes some user input from the minibuffer each time it's executed.
The usage scenario is this:
You have a complex text to change where the regexp query substitution just doesn't cut it, and you want to create a macro which:
- does some complex changes in the current line of text
- position the cursor at a specific point
- asks the user for some text in the minibuffer
- possibly executes some other action, then exits
I have tried using
M-x eval-expression
and
(insert-text (read-from-minibuffer ">"))
but after creation, the macro obviously (in retrospect... :) ) repeats the same keystrokes and therefore doesn't give me a chance to insert some new text.
Can this be done?
Thank you for the help!