DEV Community

Kay Gosho
Kay Gosho

Posted on

Emacs Registers - save kill-ring

Have you ever used Emacs' Registers?
If not, I recommend to try.

What is Registers

When we repeatedly do copy-paste, kill-ring order changes during M-d(delete-word) or C-k(kill-line).
So I used to find the text and paste it using browse-kill-ring. It takes much time.

This is where Registers comes into play.
We can save a text (and a lot of things) to named Register, and avoid missing the text even if we add something to kill-ring.

How

Registers is standard Emacs function, so just type:

  • C-x r s [key] => Save region to the Register
  • C-x r i [key] => Paste the content of the Register

Emacs25 shows preview of the content before paste. Nice:)

Screenshot_2016-11-15_18-27-41.png

...Although this is useful feature, I should admit that doing copy-paste a lot of time is not good habit.

Refs

If you would like to know more about Emacs Registers, please check out the document:

Top comments (0)