Emacs: Show kill-ring

By Xah Lee. Date: . Last updated: .

Here's a command that shows all kill-ring content in a new buffer.

(defvar xah-show-kill-ring-separator nil "A line divider for `xah-show-kill-ring'.")
(setq xah-show-kill-ring-separator "\n\nss_____________________________________________________________________________\n\n")

(defun xah-show-kill-ring ()
  "Insert all `kill-ring' content in a new buffer named *copy history*.
URL `http://ergoemacs.org/emacs/emacs_show_kill_ring.html'
Version 2019-12-02 2021-07-03"
  (interactive)
  (let (($buf (generate-new-buffer "*copy history*"))
        (inhibit-read-only t))
    (progn
      (switch-to-buffer $buf)
      (funcall 'fundamental-mode)
      (mapc
       (lambda (x)
         (insert x xah-show-kill-ring-separator ))
       kill-ring))
    (goto-char (point-min))))

Emacs Copy/Paste

Put $5 at https://www.patreon.com/xahlee , or goto paypal.com and pay to Xah@XahLee.org . Message me on XahLee discord, say so, ask me questions.
Or Buy Xah Emacs Tutorial

Xah Emacs Commands

buffer

file

edit

edit brackets

copy paste

whitespace

reformat

misc