Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bgoodr opened this issue Oct 23, 2022 · 1 comment · Fixed by #3070
Assignees

Comments

@bgoodr
Copy link

bgoodr commented Oct 23, 2022

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.

@basil-conto
Copy link
Collaborator

kill-new: Wrong type argument: sequencep, 20944

Thanks for the report, and sorry for keeping you waiting.

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.

This is part of the sad set of regressions like those mentioned in #2963 between swiper and swiper-isearch. Both commands used to operate on a list of strings, but swiper-isearch later switched to a list of buffer positions without updating all relevant commands accordingly.

I hope PR #3070 addresses the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants