all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Nils Berg <nilsb@google.com>, 24379@debbugs.gnu.org
Subject: bug#24379: [PATCH] lisp/bindings.el: Bind (yank-pop -1) to M-Y
Date: Tue, 6 Sep 2016 07:33:50 -0700 (PDT)	[thread overview]
Message-ID: <301ed440-5d6e-4fc9-9fb9-c1991ed9c457@default> (raw)
In-Reply-To: <CAGpFBBuL8YfnRPANyY5_BcN1cZ1d71+Z1iU9id_m9P4yBQWdCQ@mail.gmail.com>

> 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	other threads:[~2016-09-06 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 13:28 bug#24379: [PATCH] lisp/bindings.el: Bind (yank-pop -1) to M-Y Nils Berg
2016-09-06 14:33 ` Drew Adams [this message]
2016-09-06 15:15   ` Clément Pit--Claudel
2016-09-06 15:36     ` Drew Adams
2016-09-06 15:42       ` Clément Pit--Claudel
2016-09-06 15:58         ` Drew Adams
2016-09-14  9:42           ` Nils Berg
2016-09-06 15:13 ` Clément Pit--Claudel
2019-06-25 11:37 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=301ed440-5d6e-4fc9-9fb9-c1991ed9c457@default \
    --to=drew.adams@oracle.com \
    --cc=24379@debbugs.gnu.org \
    --cc=nilsb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.