Monday, March 10, 2008

Emacs Tip #13: browse-kill-ring

The kill-ring. You know about the kill-ring, right?

C-h i m emacs RET kill ring RET

Ok, now you know about the kill-ring, it is basically a list of all the chunks of text that have been cut (C-w) (or just saved using M-w). The basic interaction with the kill-ring is:

C-y (aka "yank" aka "paste")

After you've pasted text, if you didn't want that, but an earlier chunk of text, the key M-y will cycle through the earlier chunks, replacing what was just pasted with the earlier text.

If that's too much for you to handle, you can browse the entries in the kill-ring and paste them in (more than one if you want).

To get it, go to the wiki and download it.

To install and use, do the standard download, load-path manipulation, and:

(require 'browse-kill-ring)
M-x browse-kill-ring

[edited to correct the cut/paste commands]
[edited to fix broken link]

4 comments:

Chris said...

Nice article. One small correction: I think that by default M-w saves text and that C-w cuts it.

BFW said...

Thanks, I've corrected the post.

Anonymous said...

Nice tool, but it seems the link is now broken.

BFW said...

Link fixed, thanks.