In my ~/.emacs, there are several keyboard macros stored. They appear as (fset 'dhteu-macro-name ...
entries. BTW, dhteu
is just a random alphabet combination prefixed to avoid collision with any existing commands.
I can C-x C-k e M-x
supply a macro name and a buffer opens allowing me to edit the macro. I can edit it and save it with C-c C-c
. Now if I C-x C-k e M-x
same macro name, I see the modified version. I tried executing the modified macro on a buffer. The madified macro executes successfully.
After all this, I naturally, want to store the macro. So, I visit ~/.emacs
and M-x insert-kbd-macro
. I expect the name of the macro I just edited to be available at this prompt. It isn't.
Entering the entire name produces a no match error.
I tried C-x C-k n
to give it another name. That produces a No keyboard macro defined
error.
So, the question is: How do I edit a stored keyboard macro and save it again?
C-x C-k e M-x name
any of them and save (C-c C-c
in the macro editor) it for the session. But when I try toinsert-kbd-macro
it does not recognize this macro. If I record a new macro, there is no problem. Lastly, when do we expect to see Emacs27 in Kubuntu? :) – deshmukh Nov 24 '17 at 14:56C-x C-k n
), the name is marked to remember that it's a keyboard macro. But when youC-x C-k n
that detail is not written, so when you restart Emacs, the command is defined but the name is not marked as a keyboard macro (and Emacs doesn't recognize the actual definition as a keyboard macro either). My patch makes Emacs recognize the definition instead of checking if the name is marked as a keyboard macro. – Stefan Nov 24 '17 at 16:59~/.emacs
which should work around the problem. – Stefan Nov 25 '17 at 16:42