short: after a counsel-yank-pop, yank does not yank the same entry. How can I achieve that behavior?

long: Having a kill-ring like:


When doing a C-y (yank) and M-y (yank-pop) 'bar' will be inserted. And for every repeated C-y, 'bar' will be inserted again.
This is the behavior (repeated insertion of 'bar') I'd like to have with counsel-yank-pop instead of yank-pop.
But counsel-yank-pop does not seem to modify the kill-ring pointer for yank.
How can I achieve the wanted behavior?

Note: I'd like to keep using ivy and counsel, instead of switching to helm or something else.

  • This and other behaviours and intricacies of yank-pop are not currently supported by counsel-yank-pop (though someone may well be able to hack around the status quo). In the meantime I have submitted PR #1356 to address this as well as many other potential discrepancies between counsel-yank-pop and yank-pop.
    – Basil
    Commented Dec 8, 2017 at 4:02

1 Answer 1


counsel-yank-pop works as desired as of 2017-12-08.

The command now also accepts the same prefix argument as yank-pop which causes the corresponding kill to be preselected during completion.

Finally, counsel-yank-pop improves upon yank-pop in that it does not require the last-command to be a yank. In such cases it just inserts the selected kill at point without replacing any previous yanks.

  • yes, this version is now on melpa and it is working, many thanks!
    – jue
    Commented Dec 8, 2017 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.