bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24379: [PATCH] lisp/bindings.el: Bind (yank-pop -1) to M-Y


From: Drew Adams
Subject: bug#24379: [PATCH] lisp/bindings.el: Bind (yank-pop -1) to M-Y
Date: Tue, 6 Sep 2016 07:33:50 -0700 (PDT)

> It's extremely useful to be able to traverse the kill ring
> in both directions, especially when there's many entries in it.

It may be.  But users already have several ways to do this.

> M-Y was the most intuitive binding for this to me, but one
> could also argue in favor of C-M-y.

FWIW, I hope that neither such binding is added by default.
It is trivial for any user to add such a binding, if desired.

Many users already have their own yanking (or other) commands
bound to such keys.  (Just google `emacs "C-M-y"' and
`emacs "M-y"'.)

In my case, for example, `M-y' is `icicle-yank-pop-commands',
and `C-M-y' is `secondary-dwim'.
____

icicle-yank-pop-commands is an interactive compiled Lisp function in
`icicles-cmd1.el'.

It is bound to M-insert, M-y.

(icicle-yank-pop-commands &optional ARG)

For more information check the manuals.

`yank-pop', `yank-pop-secondary', or `icicle-completing-yank'.
Which of these is used depends on the previous command, as follows:

 * If the previous command was a yank-secondary command, then
   `yank-pop-secondary'.

 * Else if the previous command was a yank command (i.e. using the
   kill ring), then `yank-pop'.

 * Else `icicle-completing-yank'.

In the last case (`icicle-completing-yank'), during completion you can
use:

 * `C-,' to sort the candidates to yank in different ways (repeat)
 * `S-delete' to remove a candidate entry from the selection ring
 * `C-S-return' to copy a candidate to the other selection ring
____

secondary-dwim is an interactive compiled Lisp function in
`second-sel.el'.

It is bound to C-M-y, menu-bar edit secondary-dwim.

(secondary-dwim ARG)

For more information check the manuals.

Do-What-I-Mean with the secondary selection.
Prefix arg:

  None: Yank secondary.
  Zero: Select secondary as region.
  > 0:  Move secondary to region.
  < 0:  Swap region and secondary.

Details:

No prefix arg: Yank the secondary selection at point.  Move point to
the end of the inserted text.  Leave mark where it was.

Zero arg: Select the secondary selection and pop to its buffer.

Non-zero arg: Move the secondary selection to this buffer's region.

Negative arg: Also go to where the secondary selection was and select
it as the region.  That is, swap the region and the secondary
selection.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]