GNU bug report logs - #37485
27.0.50; C-m in describe-bindings

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Sun, 22 Sep 2019 21:54:01 UTC

Severity: normal

Found in version 27.0.50

To reply to this bug, email your comments to 37485 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Sun, 22 Sep 2019 21:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 22 Sep 2019 21:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; C-m in describe-bindings
Date: Sun, 22 Sep 2019 23:53:23 +0200
It's long annoyed med that `C-m' is described thusly by
describe-bindings:

C-c RET		Prefix Command

C-c RET C-c	mml-secure-message-encrypt
C-c RET C-e	mml-secure-message-sign-encrypt
C-c RET C-n	mml-unsecure-message
C-c RET C-p	Prefix Command
C-c RET C-s	mml-secure-message-sign
C-c RET C	Prefix Command
C-c RET P	mml-preview
C-c RET S	Prefix Command
C-c RET b	mml-attach-buffer
C-c RET c	Prefix Command

I know that `C-m' and RET is the same key binding, but I also think that
when this key is used as a prefix key, I don't think anybody has ever
wanted that to be RET instead of `C-m'.

Or is there a way to distinguish what we mean, somehow?


In GNU Emacs 27.0.50 (build 17, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-09-21 built on marnie
Repository revision: c61bfe0a3adab1a9fd0dc283cbf8291a78ed6da1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 10 (buster)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 02:32:01 GMT) Full text and rfc822 format available.

Message #8 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 05:31:38 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 22 Sep 2019 23:53:23 +0200
> 
> 
> It's long annoyed med that `C-m' is described thusly by
> describe-bindings:
> 
> C-c RET		Prefix Command
> 
> C-c RET C-c	mml-secure-message-encrypt
> C-c RET C-e	mml-secure-message-sign-encrypt
> C-c RET C-n	mml-unsecure-message
> C-c RET C-p	Prefix Command
> C-c RET C-s	mml-secure-message-sign
> C-c RET C	Prefix Command
> C-c RET P	mml-preview
> C-c RET S	Prefix Command
> C-c RET b	mml-attach-buffer
> C-c RET c	Prefix Command
> 
> I know that `C-m' and RET is the same key binding, but I also think that
> when this key is used as a prefix key, I don't think anybody has ever
> wanted that to be RET instead of `C-m'.

It's a key you press, so I think it's a Good Thing that we use RET
here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 10:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 12:38:11 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> C-c RET b	mml-attach-buffer
>> C-c RET c	Prefix Command
>> 
>> I know that `C-m' and RET is the same key binding, but I also think that
>> when this key is used as a prefix key, I don't think anybody has ever
>> wanted that to be RET instead of `C-m'.
>
> It's a key you press, so I think it's a Good Thing that we use RET
> here.

I'm not sure I understand...

Both RET and C-m are keys we press, but the intended (both mnemonic and
ergonomic) key stroke here is `C-c C-m c' (etc) and not the awkward `C-c
RET c'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 12:17:02 GMT) Full text and rfc822 format available.

Message #14 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 14:16:25 +0200
On Sep 23 2019, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> C-c RET b	mml-attach-buffer
>>> C-c RET c	Prefix Command
>>> 
>>> I know that `C-m' and RET is the same key binding, but I also think that
>>> when this key is used as a prefix key, I don't think anybody has ever
>>> wanted that to be RET instead of `C-m'.
>>
>> It's a key you press, so I think it's a Good Thing that we use RET
>> here.
>
> I'm not sure I understand...
>
> Both RET and C-m are keys we press, but the intended (both mnemonic and
> ergonomic) key stroke here is `C-c C-m c' (etc) and not the awkward `C-c
> RET c'.

C-m and RET are one and the same.  You are probably confusing it with
<return>.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 13:46:01 GMT) Full text and rfc822 format available.

Message #17 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 15:45:21 +0200
Andreas Schwab <schwab <at> suse.de> writes:

>>>> I know that `C-m' and RET is the same key binding,

[...]

> C-m and RET are one and the same.  You are probably confusing it with
> <return>.

No, I know they're the same.  *points upwards*

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 16:15:01 GMT) Full text and rfc822 format available.

Message #20 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 19:14:29 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 37485 <at> debbugs.gnu.org
> Date: Mon, 23 Sep 2019 12:38:11 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> C-c RET b	mml-attach-buffer
> >> C-c RET c	Prefix Command
> >> 
> >> I know that `C-m' and RET is the same key binding, but I also think that
> >> when this key is used as a prefix key, I don't think anybody has ever
> >> wanted that to be RET instead of `C-m'.
> >
> > It's a key you press, so I think it's a Good Thing that we use RET
> > here.
> 
> I'm not sure I understand...

I meant that users usually press RET, not C-m.

> Both RET and C-m are keys we press, but the intended (both mnemonic and
> ergonomic) key stroke here is `C-c C-m c' (etc) and not the awkward `C-c
> RET c'.

Call me awkward, then.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 17:08:01 GMT) Full text and rfc822 format available.

Message #23 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 19:07:44 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I'm not sure I understand...
>
> I meant that users usually press RET, not C-m.

You've done a poll?  :-)

>> Both RET and C-m are keys we press, but the intended (both mnemonic and
>> ergonomic) key stroke here is `C-c C-m c' (etc) and not the awkward `C-c
>> RET c'.
>
> Call me awkward, then.

But do you use RET instead of `C-m' in these keystrokes because that's
what `describe-bindings' say or because you prefer to hit `RET'?

Anyway, I've grepped through the *.texi files, and there are 152 matches
for `C-c C-m ...' and 8 for `C-c RET'.  And all of those 8 are for RET
as the final character in the keystroke.

If you expand to "C-. C-m"/"C-. RET" it's 170/20.  (All those additional
ones are from mule.texi.)

It seems the mode writers' intentions are pretty clear: They mean for
the users to type C-c C-m ..., but `describe-bindings' tells them to type
C-c RET.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 17:24:01 GMT) Full text and rfc822 format available.

Message #26 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 20:23:45 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 37485 <at> debbugs.gnu.org
> Date: Mon, 23 Sep 2019 19:07:44 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> I'm not sure I understand...
> >
> > I meant that users usually press RET, not C-m.
> 
> You've done a poll?  :-)

I don't need one.  Most users don't know C-m and RET are the same.

> >> Both RET and C-m are keys we press, but the intended (both mnemonic and
> >> ergonomic) key stroke here is `C-c C-m c' (etc) and not the awkward `C-c
> >> RET c'.
> >
> > Call me awkward, then.
> 
> But do you use RET instead of `C-m' in these keystrokes because that's
> what `describe-bindings' say or because you prefer to hit `RET'?

What's the difference?  Both, I guess.

> Anyway, I've grepped through the *.texi files, and there are 152 matches
> for `C-c C-m ...' and 8 for `C-c RET'.  And all of those 8 are for RET
> as the final character in the keystroke.
> 
> If you expand to "C-. C-m"/"C-. RET" it's 170/20.  (All those additional
> ones are from mule.texi.)
> 
> It seems the mode writers' intentions are pretty clear: They mean for
> the users to type C-c C-m ..., but `describe-bindings' tells them to type
> C-c RET.

I don't see why this should be decided by majority vote.

Anyway, what's the real problem here?  Just the fact that you
personally are annoyed?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 17:30:02 GMT) Full text and rfc822 format available.

Message #29 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: RE: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 10:29:15 -0700 (PDT)
> But do you use RET instead of `C-m' in these keystrokes because that's
> what `describe-bindings' say or because you prefer to hit `RET'?
> 
> Anyway, I've grepped through the *.texi files, and there are 152 matches
> for `C-c C-m ...' and 8 for `C-c RET'.  And all of those 8 are for RET
> as the final character in the keystroke.
> 
> If you expand to "C-. C-m"/"C-. RET" it's 170/20.  (All those additional
> ones are from mule.texi.)
> 
> It seems the mode writers' intentions are pretty clear: They mean for
> the users to type C-c C-m ..., but `describe-bindings' tells them to type
> C-c RET.

My 2c:

If we show only C-m then users might not realize that
they can use RET.  If we show only RET then users might
not realize they can use C-m.  That's the way it goes.

In the _doc_ (e.g. *.texi) we can always remind users
that the two are equivalent (but not always equivalent
to <return>).  In particular, we can do that for a key
binding that uses it after another C- key (e.g. after
C-c).

But in C-m, C-b, etc., we should provide the same
key-description format, systematically.  It would be
confusing to sometimes use C-m and sometimes RET in
such contexts.  That could give users the false idea
that the two are different.

Emacs has always used RET in this case (key listings).
And in most cases the key is not used as a prefix key,
and it does not follow a C- key.  And most users (I
think) will recognize and use RET for such cases, even
if they use C-m after a C- key or as a prefix key.

So I'd vote for keeping RET in such lists of key
descriptions.  But I'd agree that it can help to point
out, in doc, that you can use C-m as an alternative.
Pointing that out is especially useful in a context
where the key follows a C- key, and possibly even
where it does not but it is used as a prefix key.

So "the mode writers" you mention aren't necessarily
wrong.  But it would be wrong to change key listings,
which are not specific to a given mode, to use C-m.

You might say that `C-h m' is all about documenting
the _mode_, so its output should reflect what "the
mode writers" use.  If that's the point then the mode
description (doc string) can simply add a sentence
reminding users that C-M = RET.  Such a case is not
a good reason not to keep key listings consistent.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 17:35:01 GMT) Full text and rfc822 format available.

Message #32 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 19:33:57 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Anyway, what's the real problem here?  Just the fact that you
> personally are annoyed?

The problem is that these key bindings, as formatted by describe-keys,
aren't what was intended.  We don't choose key bindings on a whime. `C-c
C-m' for instance (in Message mode), has the "m" as a mnemonic for
"MIME".  `C-c RET' doesn't mean anything.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 17:51:01 GMT) Full text and rfc822 format available.

Message #35 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 20:50:11 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 37485 <at> debbugs.gnu.org
> Date: Mon, 23 Sep 2019 19:33:57 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Anyway, what's the real problem here?  Just the fact that you
> > personally are annoyed?
> 
> The problem is that these key bindings, as formatted by describe-keys,
> aren't what was intended.  We don't choose key bindings on a whime. `C-c
> C-m' for instance (in Message mode), has the "m" as a mnemonic for
> "MIME".  `C-c RET' doesn't mean anything.

Key description and fast typing are two separate issues.  Mnemonics is
yet another, third, issue (and assigning mnemonic value to 'm' in C-m
is generally unusual, IME).  I don't think these additional issues
should affect how we display C-m/RET _everywhere_ in our docs.  E.g.,
would you propose to use C-i instead of TAB?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 17:59:02 GMT) Full text and rfc822 format available.

Message #38 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 19:58:15 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Key description and fast typing are two separate issues.  Mnemonics is
> yet another, third, issue (and assigning mnemonic value to 'm' in C-m
> is generally unusual, IME).  I don't think these additional issues
> should affect how we display C-m/RET _everywhere_ in our docs.  E.g.,
> would you propose to use C-i instead of TAB?

Hm...  I think so?  (There's 67 `C-. C-i' in the manual.)

Mind you, I'm only talking about multi-key keystrokes if we were to do
this by default.

But what I really had in mind was to find out whether anybody had any
smart ideas for how to convey to `describe-bindings' how these keys
should be displayed on a per-keymap basis.  I hadn't taken a look at how
keymaps are defined at all...

But they are really char-table objects wrapped in a list?

Would it be possible to add an option to `make-keymap' that would pass
along an argument to control what `describe-bindings' should do with the
keymap?  And then stash that in the char-table object?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37485; Package emacs. (Mon, 23 Sep 2019 18:45:01 GMT) Full text and rfc822 format available.

Message #41 received at 37485 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37485 <at> debbugs.gnu.org
Subject: Re: bug#37485: 27.0.50; C-m in describe-bindings
Date: Mon, 23 Sep 2019 21:44:38 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 37485 <at> debbugs.gnu.org
> Date: Mon, 23 Sep 2019 19:58:15 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Key description and fast typing are two separate issues.  Mnemonics is
> > yet another, third, issue (and assigning mnemonic value to 'm' in C-m
> > is generally unusual, IME).  I don't think these additional issues
> > should affect how we display C-m/RET _everywhere_ in our docs.  E.g.,
> > would you propose to use C-i instead of TAB?
> 
> Hm...  I think so?  (There's 67 `C-. C-i' in the manual.)

And 187 TABs.

> Mind you, I'm only talking about multi-key keystrokes if we were to do
> this by default.

I don't see the difference, and neither does describe-key, AFAIK.

> But what I really had in mind was to find out whether anybody had any
> smart ideas for how to convey to `describe-bindings' how these keys
> should be displayed on a per-keymap basis.  I hadn't taken a look at how
> keymaps are defined at all...
> 
> But they are really char-table objects wrapped in a list?
> 
> Would it be possible to add an option to `make-keymap' that would pass
> along an argument to control what `describe-bindings' should do with the
> keymap?  And then stash that in the char-table object?

I think it's a waste of cycles.  We have much more important stuff to
spend time on.  But that's me.




This bug report was last modified 5 years and 266 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.