Skip to content

Conversation

@basil-conto
Copy link
Collaborator

The default M-w binding of ivy-kill-ring-save expects ivy--old-cands to be a list of strings, but swiper-isearch has long switched to a list of buffer positions instead.

  • ivy.el (ivy-kill-ring-save): Prefer use-region-p over region-active-p. Use string-join. Tweak docstring.
  • swiper.el: Set swiper and swiper-isearch actions closer to their corresponding commands.
    (swiper--isearch-kill-ring-save): New command modeled after ivy-kill-ring-save.
    (swiper-isearch-map): Remap ivy-kill-ring-save and kill-ring-save to it. By default, the former remap is defensive, and only the latter is needed.

Fixes #3000.
Cc: @bgoodr

The default M-w binding of ivy-kill-ring-save expects ivy--old-cands
to be a list of strings, but swiper-isearch has long switched to a
list of buffer positions instead.

* ivy.el (ivy-kill-ring-save): Prefer use-region-p over
region-active-p.  Use string-join.  Tweak docstring.
* swiper.el: Set swiper and swiper-isearch actions closer to their
corresponding commands.
(swiper--isearch-kill-ring-save): New command modeled after
ivy-kill-ring-save.
(swiper-isearch-map): Remap ivy-kill-ring-save and kill-ring-save to
it.  By default, the former remap is defensive, and only the latter
is needed.

Fixes #3000.
@basil-conto basil-conto self-assigned this Mar 23, 2025
@basil-conto basil-conto merged commit 790042e into master Mar 23, 2025
36 checks passed
@basil-conto basil-conto deleted the blc/kill branch March 23, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants