swiper icon indicating copy to clipboard operation
swiper copied to clipboard

M-w (‘ivy-kill-ring-save’) errors out with: kill-new: Wrong type argument: sequencep, 20944

Open bgoodr opened this issue 3 years ago • 0 comments

Version of ivy I'm using is : .emacs.d/elpa/ivy-20220926.1250/ivy.el

Steps to reproduce:

Open any buffer with text in it.

Type C-s to start a search (C-s is bound to swiper-isearch).

Type M-w to call ivy-kill-ring-save.

See the error:

kill-new: Wrong type argument: sequencep, 20944

Current definition of ivy-kill-ring-save:

(defun ivy-kill-ring-save ()
  "Store the current candidates into the kill ring.
If the region is active, forward to `kill-ring-save' instead."
  (interactive)
  (if (region-active-p)
      (call-interactively 'kill-ring-save)
    (kill-new
     (mapconcat
      #'identity
      ivy--old-cands
      "\n"))))

ivy--old-cands are not strings but sequence numbers of some sort. So that is the main symptom of the bug but I cannot find out what the intent was of that code.

bgoodr avatar Oct 23 '22 15:10 bgoodr