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

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

Fixes #1371

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

Fixes abo-abo#1371
@abo-abo abo-abo merged commit 620a966 into abo-abo:master Dec 12, 2017
@abo-abo
Copy link
Owner

abo-abo 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 yank-preselect branch December 12, 2017 08:20
basil-conto added a commit to basil-conto/swiper that referenced this pull request Dec 12, 2017
@basil-conto
Copy link
Collaborator Author

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

@basil-conto
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants