Is there a way to show all keyboard macros (similar to insert-kbd-macro) without having to first name each macro?

Using macros with evil-mode in case this makes a difference.

  • How can you have multiple macros without naming them first?
    – Turn
    Feb 3, 2018 at 3:37
  • Using evil-mode's Q-key, then an Alpha Key. (Maybe this names them too?). Either way - how to dump all of them at once?
    – ideasman42
    Feb 3, 2018 at 3:42
  • 2
    @Turn Emacs has a macro ring.
    – user12563
    Mar 5, 2018 at 7:59

1 Answer 1


Evil-specific answer:

In Vim, macros are saved in registers, so :reg[isters] displays them as well.

  • Is there a way to show these in a format I can run as elisp code? - as with insert-kbd-macro
    – ideasman42
    Feb 3, 2018 at 9:02
  • Keyboard macros are saved as a string of characters that have been recorded in some particular Emacs state. Conversion to elisp will be lossy because the information about the Emacs states is lost. Just execute the keyboard macro, like by binding the string to a key or programmatically with execute-kbd-macro.
    – wasamasa
    Feb 3, 2018 at 13:29
  • So how can I get all these strings of characters? - insert-kbd-macro seems to be able to show them.
    – ideasman42
    Feb 3, 2018 at 13:52
  • 1
    They live in (evil-register-list).
    – wasamasa
    Feb 3, 2018 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.