2

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:

foo
bar
baz

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 Dec 8 '17 at 4:02
4

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 Dec 8 '17 at 22:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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