2020-11-30 Repeating complex commands

Today I learned about a fantastic Emacs feature I had no idea about.

I knew that the key C-x z is bound to the repeat command, which, well, repeats the last (simple) command – I even use it from time to time.

I had no idea, however, that there is another command which can repeat “complex” commands – i.e., ones that use the minibuffer to accept some input. It turns out that if you press C-x ESC ESC (repeat-complex-command), Emacs will convert the last command that used the minibuffer to an Elisp function call and put it into the minibuffer for you to possibly edit and confirm by pressing RET.

I am not sure if – or how often – I might need it to actually repeat commands, but it might actually be useful to budding Elisp programmers to quickly and easily convert human actions into Elisp code. Also, it is insanely cool;-).

CategoryEnglish, CategoryBlog, CategoryEmacs