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

Allow counsel-yank-pop after point #1762

Merged
merged 3 commits into from Sep 20, 2018
Merged

Conversation

basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Sep 20, 2018

See #1761 for precedents. I have tried to make each commit atomic, so reviewing them in turn should be easiest.

N.B. The last commit introduces a user-visible breaking change. Previously, counsel-yank-pop interpreted any prefix argument as a number, e.g. C-u and M-4 both yanked the 4th previous kill. Now, plain prefix arguments like C-u are interpreted similarly to vanilla yank, in that they temporarily toggle the new counsel-yank-pop-after-point. The following are my justifications for this:

  1. Using C-u for this purpose is natural because it acquires effectively the same meaning as for vanilla yank.
  2. C-u4 and M-4 are not terribly different to or more difficult than plain C-u (in fact they are more intuitive), and I doubt many people were using the latter with counsel-yank-pop, as it's simultaneously a very specific kill ring position, but also large enough a number to be relatively arbitrary/obscure.
  3. I find it quite unlikely that users of counsel-yank-pop rely on the exponential nature of repeated C-u invocations to quickly yank the 16th, 64th, etc. kill.

Re: #884
Cc: @Custodia, @dieggsy

basil-conto added 3 commits Sep 20, 2018
(counsel-yank-pop-action, counsel-yank-pop): Do not bother setting
ivy-completion-beg and ivy-completion-end.  They do not seem to be
used anywhere, and their relative ordering might be reversed
following C-u C-y.

Re: abo-abo#1761
This is in preparation for future work in this area.
(counsel-yank-pop-after-point): New user option.
(counsel-yank-pop-action):
Use it to determine whether to exchange point and mark.
(counsel-yank-pop): Repurpose plain prefix arguments like C-u for
temporarily toggling the new counsel-yank-pop-after-point.

Re: abo-abo#884
Closes abo-abo#1761
@abo-abo abo-abo merged commit 4b1881e into abo-abo:master Sep 20, 2018
1 check passed
@basil-conto basil-conto deleted the blc/yank-after branch Sep 20, 2018
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.

None yet

2 participants