Some Register Tips

Tory Anderson has a handy post that reminds us about the utility of registers in Emacs. It’s easy to forget about them but they’re incredibly useful and flexible. Anderson considers three of the major use-cases:

  1. Saving text in a register.
  2. Saving a window configuration in a register.
  3. Saving the position of the point in a register.

I learned a couple of new things from the post. It’s possible to list the current registers with Meta+x list-registers. You can also get a short list with Ctrl+x r j. That’s normally the way you jump to a register but if you wait a short time, Emacs will pop up a list of registers and their contents even if a register contains something you can’t jump to such as a string. This list is meant to show you the available registers, much like abo-abo’s Counsel functions or the corresponding Helm functions, so you’ll have to quit the operation with Ctrl+g to avoid a possibly undesirable interaction with one of the registers but it’s a quick and easy to see what registers are currently in use.

This entry was posted in General and tagged . Bookmark the permalink.