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

counsel.el (counsel-yank-pop): Add preselect toggle #1373

Merged
merged 1 commit into from Dec 12, 2017

Conversation

@basil-conto
Copy link
Collaborator

commented Dec 11, 2017

(counsel-yank-pop-preselect-last): New defcustom.
(counsel-yank-pop): Use it.

Fixes #1371

counsel.el (counsel-yank-pop): Add preselect toggle
(counsel-yank-pop-preselect-last): New defcustom.
(counsel-yank-pop): Use it.

Fixes #1371

@abo-abo abo-abo merged commit 620a966 into abo-abo:master Dec 12, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abo-abo

This comment has been minimized.

Copy link
Owner

commented Dec 12, 2017

Thanks. Although I notice more problems related to the duplicates deletion. If you kill something that's already on the kill ring, it won't be preselected.

@basil-conto basil-conto deleted the basil-conto:yank-preselect branch Dec 12, 2017

basil-conto added a commit to basil-conto/swiper that referenced this pull request Dec 12, 2017
@basil-conto

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 12, 2017

Ah, good catch. I didn't realise cl-delete-duplicates keeps the last occurence of each duplicated element.

@basil-conto

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 12, 2017

In other words, I think the preselection is behaving properly, but the duplicate kill wasn't being brought to the front of the kill-ring because cl-delete-duplicates keeps the last duplicate, compared with delete-dups, which keeps the first duplicate.

Does that sound right to you?

@basil-conto

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 12, 2017

The documentation that eluded me was under the cl-remove-duplicates entry in (cl) Sequence Functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.