Next: , Previous: Killing, Up: Top


14 Yanking

Yanking means reinserting text previously killed. This is what some systems call “pasting.” The usual way to move or copy text is to kill it and then yank it elsewhere one or more times. This is very safe because Emacs remembers many recent kills, not just the last one.

C-y
Yank last killed text (yank).
M-y
Replace text just yanked with an earlier batch of killed text (yank-pop).
M-w
Save region as last killed text without actually killing it (kill-ring-save). Some systems call this “copying”.
C-M-w
Append next kill to last batch of killed text (append-next-kill).

On window systems, if there is a current selection in some other application, and you selected it more recently than you killed any text in Emacs, C-y copies the selection instead of text killed within Emacs.