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:
Keybind | Function |
---|---|
C-n | Iterate the ring to the next macro |
C-p | Iterate the ring to the previous macro |
C-k | Execute the current selected macro |
C-e | Edit the current selected macro |
C-d | Delete the current selected macro |