Emacs Keyboard Macro

We can record #keystrokes combination into a single macro and to be called later in #202206121637. Emacs store macros recorded into a single ring, much like the kill ring. However, the macro ring will only be available for its corresponding buffer, meaning it can’t be called in other windows or buffers.

To start the keyboard macro recording, press <F3> or C-x (, and end it by <F4> or C-x ). If you found that the macro is unsatisfactory, you could append it further using the keybind C-u C-u <F3>. To execute the recently created macro, press <F4> again or C-x e.

To access the macro ring, we’ll need to prefix C-x C-k before reaching down its operation. The following table shows several operations could be done for the ring:

KeybindFunction
C-nIterate the ring to the next macro
C-pIterate the ring to the previous macro
C-kExecute the current selected macro
C-eEdit the current selected macro
C-dDelete the current selected macro
Links to this page
  • Emacs Keybinding

    #202206121637 has a complicated set of keybindings that user could take advantage of to manipulate lines, buffers, files etc. We can customise the keybindings in respect to our own preference by defining them in Emacs #lisp. Additionally, it can be recorded using 202208061214# to execute complicated keystrokes combination for several times.

#emacs