Append to kill-ring

We previously looked at cycling through the history of the kill-ring (emacs’ clipboard). A somewhat related idea is that you can append text that you cut or copy onto the last entry of the kill-ring so that you can accumulate several pieces of text into a single clipboard entry.

You do this by preceding a cut or copy command with C-M-w (this also happens automatically if you use successive cut/copy commands without anything else in between).

This is explained in the emacs manual, but as a simple illustration in the animation below I cut the line bbbbbbb and then move to the ddddddd line and hit C-M-w before cutting that line. My paste command then pastes the two lines.

append-to-kill-ring.gif

  • I only just started using append-next-kill. Super handy. Wrote a related method: http://xenodium.com/#fishing-with-emacs

  • Compro Prasad

    Your stuff is really useful, short and handy. You should name your site as “uncovering the mysteries of Emacs”.