TransWikia.com

How to display list of previous copies/kills (`M-w` or `C-w`)?

Emacs Asked by Erwann on September 2, 2021

C-n C-y retrieves the n-last call to C-w, I think. Is there a way to show all that were saved?

3 Answers

Check the value of the kill-ring variable e.g. with C-h v kill-ring RET, or perhaps better, evaluate it in the *scratch* buffer with kill-ring C-j. The doc string of the variable says:

List of killed text sequences.

Since the kill ring is supposed to interact nicely with cut-and-paste facilities offered by window systems, use of this variable should interact nicely with interprogram-cut-function and interprogram-paste-function. The functions kill-new, kill-append, and current-kill are supposed to implement this interaction; you may want to use them instead of manipulating the kill ring directly.

See also the kill ring section in the Emacs Lisp manual.

Correct answer by NickD on September 2, 2021

I would say what you want is provided by one of theses packages :

Spacemacs uses consel-yank-pop acessible with SPC-r-y (command already cited by @Heikki) provided by swipper. So you can also look at it.

Answered by Samusz on September 2, 2021

The command counsel-yank-pop which is part of the swiper package, gives you an interactive way to browse and insert elements from you kill ring.

Answered by Heikki on September 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP