GNU bug report logs -
#24379
[PATCH] lisp/bindings.el: Bind (yank-pop -1) to M-Y
Previous Next
Reported by: Nils Berg <nilsb <at> google.com>
Date: Tue, 6 Sep 2016 13:29:02 UTC
Severity: wishlist
Tags: patch, wontfix
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24379 in the body.
You can then email your comments to 24379 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 13:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nils Berg <nilsb <at> google.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 06 Sep 2016 13:29:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
It's extremely useful to be able to traverse the kill ring in both
directions, especially when there's many entries in it.
M-Y was the most intuitive binding for this to me, but one
could also argue in favor of C-M-y.
---
lisp/bindings.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index c13f4b1..42efd05 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -889,6 +889,7 @@ if `inhibit-field-text-motion' is non-nil."
(define-key esc-map "\C-w" 'append-next-kill)
(define-key global-map "\C-y" 'yank)
(define-key esc-map "y" 'yank-pop)
+(define-key esc-map "Y" (lambda () (interactive) (yank-pop -1)))
;; (define-key ctl-x-map "a" 'append-to-buffer)
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 14:35:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24379 <at> debbugs.gnu.org (full text, mbox):
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 15:15:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Did you try M-- M-y (that is meta-minus, meta-y)?
Clément.
On 2016-09-06 09:28, Nils Berg wrote:
> It's extremely useful to be able to traverse the kill ring in both
> directions, especially when there's many entries in it.
>
> M-Y was the most intuitive binding for this to me, but one
> could also argue in favor of C-M-y.
>
> ---
> lisp/bindings.el | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lisp/bindings.el b/lisp/bindings.el
> index c13f4b1..42efd05 100644
> --- a/lisp/bindings.el
> +++ b/lisp/bindings.el
> @@ -889,6 +889,7 @@ if `inhibit-field-text-motion' is non-nil."
> (define-key esc-map "\C-w" 'append-next-kill)
> (define-key global-map "\C-y" 'yank)
> (define-key esc-map "y" 'yank-pop)
> +(define-key esc-map "Y" (lambda () (interactive) (yank-pop -1)))
>
> ;; (define-key ctl-x-map "a" 'append-to-buffer)
>
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 15:16:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 24379 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2016-09-06 10:33, Drew Adams wrote:
> Many users already have their own yanking (or other) commands
> bound to such keys. (Just google `emacs "C-M-y"' and
> `emacs "M-y"'.)
How would a new binding affect these users?
> In my case, for example, `M-y' is `icicle-yank-pop-commands',
> and `C-M-y' is `secondary-dwim'.
M-y is already bound to yank-pop in plain Emacs, so I'm not sure I follow your point :/
Clément.
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 15:37:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24379 <at> debbugs.gnu.org (full text, mbox):
> > Many users already have their own yanking (or other) commands
> > bound to such keys. (Just google `emacs "C-M-y"' and
> > `emacs "M-y"'.)
>
> How would a new binding affect these users?
Users can always override any key bindings, of course.
But many users are hesitant to override default bindings,
for whatever reasons.
This suggested default binding is really unnecessary, IMO.
It is trivial for someone to add it, if they like.
> > In my case, for example, `M-y' is `icicle-yank-pop-commands',
> > and `C-M-y' is `secondary-dwim'.
>
> M-y is already bound to yank-pop in plain Emacs, so I'm not
> sure I follow your point :/
Yes, and my `M-y' is only turned on in Icicle minor mode (but
which I am always in). You can drop that example, if you like,
and just google for `emacs "M-y"' if you would like to see what
other users do with `M-y'.
My point was the _general_ one that I stated: (1) Many users
have their own uses of `M-y' and `C-M-y'. And (2) adding this
particular binding is not helpful - it is trivial for anyone
to add it, if they really want it.
There are not so many good keys available. Arguments for
binding more keys globally (not for some mode) by default,
in particular, should be strong arguments.
They should not proceed _only_ from:
* the-key-is-not-bound-by-default or
* here-is-a-useful-command-that-is-not-bound-by-default
There should be a more compelling reason to add a new default
key binding, IMHO.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 15:43:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 24379 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2016-09-06 11:36, Drew Adams wrote:
> Users can always override any key bindings, of course.
> But many users are hesitant to override default bindings,
> for whatever reasons.
>
> …
>
> Yes, and my `M-y' is only turned on in Icicle minor mode (but
> which I am always in). You can drop that example, if you like,
> and just google for `emacs "M-y"' if you would like to see what
> other users do with `M-y'.
I'm having trouble reconciling these two statements: on the one hand people don't like overriding existing bindings, but on the other hand many people override the existing M-y binding?
> My point was the _general_ one that I stated: (1) Many users
> have their own uses of `M-y' and `C-M-y'. And (2) adding this
> particular binding is not helpful - it is trivial for anyone
> to add it, if they really want it.
I don't understand. All bindings are trivial to add. That doesn't make any of them less helpful.
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 06 Sep 2016 15:59:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 24379 <at> debbugs.gnu.org (full text, mbox):
> > Users can always override any key bindings, of course.
> > But many users are hesitant to override default bindings,
> > for whatever reasons.
...
> > Yes, and my `M-y' is only turned on in Icicle minor mode (but
> > which I am always in). You can drop that example, if you like,
> > and just google for `emacs "M-y"' if you would like to see what
> > other users do with `M-y'.
>
> I'm having trouble reconciling these two statements: on the one hand
> people don't like overriding existing bindings, but on the other hand
> many people override the existing M-y binding?
Maybe you're having trouble because you're trying too hard to
argue. ;-)
Many users do override default bindings. And many do not.
In any case, the proposal was about `M-Y', which is not bound
by default.
> > My point was the _general_ one that I stated: (1) Many users
> > have their own uses of `M-y' and `C-M-y'. And (2) adding this
> > particular binding is not helpful - it is trivial for anyone
> > to add it, if they really want it.
>
> I don't understand. All bindings are trivial to add. That doesn't make any
> of them less helpful.
It's a trivial command, which is not hard for a user to discover
or consider binding. And as you yourself pointed out, `M-- M-y'
does the same thing.
You're trying too hard to pick a fight, I'm afraid.
Do _you_ think `M-Y' should be bound by default to the suggested
command? If so, please present some supporting arguments.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Wed, 14 Sep 2016 09:44:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 24379 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Some healthy discussion here, so let me preface this by saying I appreciate
all of you working to keep the default bindings useful and not excessive.
That said, I still feel there should be a single binding for (yank-pop -1).
Here's why:
First, all of the other commands that traverse something (that I can think
of) have an opposite bound to an equally convenient combination.
C-n/C-p and C-f/C-b, C-v/M-v, C-s/C-r are some examples off the top of my
head.
Of course 'M-- M-y' works, but that's like saying 'M-- C-n' does the same
thing as C-p.
(As a side note, I'll admit I didn't actually know/remember M-- is a
shorthand for 'C-u -1'. That does make the common case of overshooting the
item you want by 1 a lot less painful.)
Second, I fully agree with Clément that just because a command is trivial,
it's automatically unhelpful to bind it. Again, see C-n/C-p.
And lastly, if a user has a custom binding for M-Y or C-M-y (I'm not dead
set on either), that will still prevail.
I don't see why they'd be any more reluctant to override those than M-y,
which you said lots of people do.
It's pretty hard to google "M-y", much less "M-Y", without Google deciding
I'm actually looking for "my", so I'm going to trust you on that.
So that's my 2 Cents. If you're still unconvinced, feel free to close this
:)
On Tue, Sep 6, 2016 at 5:58 PM, Drew Adams <drew.adams <at> oracle.com> wrote:
> > > Users can always override any key bindings, of course.
> > > But many users are hesitant to override default bindings,
> > > for whatever reasons.
> ...
> > > Yes, and my `M-y' is only turned on in Icicle minor mode (but
> > > which I am always in). You can drop that example, if you like,
> > > and just google for `emacs "M-y"' if you would like to see what
> > > other users do with `M-y'.
> >
> > I'm having trouble reconciling these two statements: on the one hand
> > people don't like overriding existing bindings, but on the other hand
> > many people override the existing M-y binding?
>
> Maybe you're having trouble because you're trying too hard to
> argue. ;-)
>
> Many users do override default bindings. And many do not.
>
> In any case, the proposal was about `M-Y', which is not bound
> by default.
>
> > > My point was the _general_ one that I stated: (1) Many users
> > > have their own uses of `M-y' and `C-M-y'. And (2) adding this
> > > particular binding is not helpful - it is trivial for anyone
> > > to add it, if they really want it.
> >
> > I don't understand. All bindings are trivial to add. That doesn't make
> any
> > of them less helpful.
>
> It's a trivial command, which is not hard for a user to discover
> or consider binding. And as you yourself pointed out, `M-- M-y'
> does the same thing.
>
> You're trying too hard to pick a fight, I'm afraid.
>
> Do _you_ think `M-Y' should be bound by default to the suggested
> command? If so, please present some supporting arguments.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24379
; Package
emacs
.
(Tue, 25 Jun 2019 11:38:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 24379 <at> debbugs.gnu.org (full text, mbox):
Nils Berg <nilsb <at> google.com> writes:
> It's extremely useful to be able to traverse the kill ring in both
> directions, especially when there's many entries in it.
>
> M-Y was the most intuitive binding for this to me, but one
> could also argue in favor of C-M-y.
As Clément said, this is already on `M-- M-y', which I think makes more
sense... but in the common case, I think most people just hit `undo' to
get back to the previous yanks.
In any case, I don't think an additional keystroke is warranted, and I'm
closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 25 Jun 2019 11:38:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
24379 <at> debbugs.gnu.org and Nils Berg <nilsb <at> google.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 25 Jun 2019 11:38:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 24 Jul 2019 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.