Function: consult-yank-pop

consult-yank-pop is an autoloaded, interactive and byte-compiled function defined in consult.el.

Signature

(consult-yank-pop &optional ARG)

Documentation

If there is a recent yank act like yank-pop.

Otherwise select string from the kill ring and insert it. See yank-pop for the meaning of ARG.

This command behaves like yank-pop, which also offers a completing-read interface to the kill-ring. Additionally the Consult version supports preview of the selected string.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
;;;###autoload
(defun consult-yank-pop (&optional arg)
  "If there is a recent yank act like `yank-pop'.

Otherwise select string from the kill ring and insert it.
See `yank-pop' for the meaning of ARG.

This command behaves like `yank-pop', which also offers a
`completing-read' interface to the `kill-ring'.  Additionally the
Consult version supports preview of the selected string."
  (interactive "*p")
  (if (eq last-command 'yank)
      (yank-pop (or arg 1))
    (call-interactively #'consult-yank-from-kill-ring)))