2019-07-08 Pausing an Emacs keyboard macro

As I promised last week, I’d like to describe something I probably knew a long time ago, but completely forgot about.

You can pause an Emacs keyboard macro during its execution.

But wait, there’s more! During recording a macro, you can press C-x q (this means kbd-macro-query), and when the macro is run, Emacs pauses there and gives you four choices:

That is already pretty cool, but there is even more than that! C-u C-x q during macro recording enters recursive edit, and that serves two purposes: firstly, you may perform some editing which will not become part of the macro, and secondly, during macro execution, you will also enter recursive edit (and the macro will resume after C-M-c).

All this is probably not something you would use every day, but it may come handy once in a while – so it may be good to remember that something like this exists. Hopefully I won’t forget about it anymore!

CategoryEnglish, CategoryBlog, CategoryEmacs