DEV Community

Kay Gosho
Kay Gosho

Posted on

1 1

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:

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay