GNU bug report logs - #50727
Contradictory conventions with new command kbd-macro-display

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Tue, 21 Sep 2021 23:23:02 UTC

Severity: minor

Fixed in version 28.1

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 50727 in the body.
You can then email your comments to 50727 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to larsi <at> gnus.org, marcowahlsoft <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Tue, 21 Sep 2021 23:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to larsi <at> gnus.org, marcowahlsoft <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Tue, 21 Sep 2021 23:23:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: Contradictory conventions with new command kbd-macro-display
Date: Tue, 21 Sep 2021 16:22:26 -0700
Severity: minor

`kbd-macro-display' is a new command in Emacs 28 bound to `C-x C-k Q'.
(See commit d4e9d191aeba.)

However, the `kmacro-bind-to-key' docstring says:

    The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
    through [C-x C-k Z] are reserved for user bindings, and to bind to
    one of these sequences, just enter the digit or letter, rather than
    the whole sequence.

This advice seems to conflict with the chosen key binding for
`kbd-macro-display'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Tue, 21 Sep 2021 23:28:01 GMT) Full text and rfc822 format available.

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

From: Gregory Heytings <gregory <at> heytings.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: larsi <at> gnus.org, 50727 <at> debbugs.gnu.org, marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Tue, 21 Sep 2021 23:27:29 +0000
>
> `kbd-macro-display' is a new command in Emacs 28 bound to `C-x C-k Q'. 
> (See commit d4e9d191aeba.)
>
> However, the `kmacro-bind-to-key' docstring says:
>
>    The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
>    through [C-x C-k Z] are reserved for user bindings, and to bind to
>    one of these sequences, just enter the digit or letter, rather than
>    the whole sequence.
>
> This advice seems to conflict with the chosen key binding for 
> `kbd-macro-display'.
>

It's 'kbd-macro-redisplay', not 'kbd-macro-display'.  Indeed it conflicts 
with the keys that are supposed to be reserved for user bindings, but it 
is by far not the only one:

C-x C-k Q	kdb-macro-redisplay
C-x C-k b	kmacro-bind-to-key
C-x C-k e	edit-kbd-macro
C-x C-k l	kmacro-edit-lossage
C-x C-k n	kmacro-name-last-macro
C-x C-k q	kbd-macro-query
C-x C-k r	apply-macro-to-region-lines
C-x C-k s	kmacro-start-macro
C-x C-k x	kmacro-to-register




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 06:18:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: larsi <at> gnus.org, 50727 <at> debbugs.gnu.org, marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Wed, 22 Sep 2021 09:16:51 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Tue, 21 Sep 2021 16:22:26 -0700
> Cc: larsi <at> gnus.org, marcowahlsoft <at> gmail.com
> 
>     The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
>     through [C-x C-k Z] are reserved for user bindings, and to bind to
>     one of these sequences, just enter the digit or letter, rather than
>     the whole sequence.

Regardless of the main issue here, why does this doc string use this
strange notation for key sequences?  What is the meaning of the
brackets here, and why don't we use `..' as usual?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 06:38:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: larsi <at> gnus.org, 50727 <at> debbugs.gnu.org, marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Tue, 21 Sep 2021 23:37:35 -0700
Gregory Heytings <gregory <at> heytings.org> writes:

> It's 'kbd-macro-redisplay', not 'kbd-macro-display'.

Sorry, yes: `kbd-macro-redisplay'.

> Indeed it conflicts with the keys that are supposed to be reserved for
> user bindings, but it is by far not the only one:
>
> C-x C-k Q	kdb-macro-redisplay
> C-x C-k b	kmacro-bind-to-key
> C-x C-k e	edit-kbd-macro
> C-x C-k l	kmacro-edit-lossage
> C-x C-k n	kmacro-name-last-macro
> C-x C-k q	kbd-macro-query
> C-x C-k r	apply-macro-to-region-lines
> C-x C-k s	kmacro-start-macro
> C-x C-k x	kmacro-to-register

I believe only the first one of these breaks the convention, as it is
the only one to use an upper-case letter.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 06:54:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 50727 <at> debbugs.gnu.org, marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Tue, 21 Sep 2021 23:53:06 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

>>     The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
>>     through [C-x C-k Z] are reserved for user bindings, and to bind to
>>     one of these sequences, just enter the digit or letter, rather than
>>     the whole sequence.
>
> Regardless of the main issue here, why does this doc string use this
> strange notation for key sequences?  What is the meaning of the
> brackets here, and why don't we use `..' as usual?

AFAICT, there is no particular reason for using that notation here.
I'll push a fix for that shortly, lumped in with some other checkdoc
fixes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 06:59:02 GMT) Full text and rfc822 format available.

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

From: Marco Wahl <marcowahlsoft <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Gregory Heytings <gregory <at> heytings.org>, 50727 <at> debbugs.gnu.org,
 larsi <at> gnus.org
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Wed, 22 Sep 2021 08:58:45 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Gregory Heytings <gregory <at> heytings.org> writes:
>
>> It's 'kbd-macro-redisplay', not 'kbd-macro-display'.
>
> Sorry, yes: `kbd-macro-redisplay'.
>
>> Indeed it conflicts with the keys that are supposed to be reserved for
>> user bindings, but it is by far not the only one:
>>
>> C-x C-k Q	kdb-macro-redisplay
>> C-x C-k b	kmacro-bind-to-key
>> C-x C-k e	edit-kbd-macro
>> C-x C-k l	kmacro-edit-lossage
>> C-x C-k n	kmacro-name-last-macro
>> C-x C-k q	kbd-macro-query
>> C-x C-k r	apply-macro-to-region-lines
>> C-x C-k s	kmacro-start-macro
>> C-x C-k x	kmacro-to-register
>
> I believe only the first one of these breaks the convention, as it is
> the only one to use an upper-case letter.

Thanks for pointing out the issue!

Now what to do?

What about dropping key sequence C-x C-k Q and use C-x C-k d instead?
Or even dropping that key sequence entirey?

I vote for keeping a key sequence for kdb-macro-redisplay, tho.










Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 07:02:02 GMT) Full text and rfc822 format available.

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

From: Gregory Heytings <gregory <at> heytings.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: larsi <at> gnus.org, 50727 <at> debbugs.gnu.org, marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Wed, 22 Sep 2021 07:01:00 +0000
>> Indeed it conflicts with the keys that are supposed to be reserved for 
>> user bindings, but it is by far not the only one:
>>
>> C-x C-k Q	kdb-macro-redisplay
>> C-x C-k b	kmacro-bind-to-key
>> C-x C-k e	edit-kbd-macro
>> C-x C-k l	kmacro-edit-lossage
>> C-x C-k n	kmacro-name-last-macro
>> C-x C-k q	kbd-macro-query
>> C-x C-k r	apply-macro-to-region-lines
>> C-x C-k s	kmacro-start-macro
>> C-x C-k x	kmacro-to-register
>
> I believe only the first one of these breaks the convention, as it is 
> the only one to use an upper-case letter.
>

Indeed, I thought that the convention was similar to the C-c LETTER one, 
in which both lower and upper case letters are reserved for users, but you 
are correct, it's only upper case letters that are reserved for users in 
this case.  Which IMO isn't a good thing, typing C-x C-k S-LETTER is 
awkward.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 07:03:01 GMT) Full text and rfc822 format available.

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

From: Marco Wahl <marcowahlsoft <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50727 <at> debbugs.gnu.org, larsi <at> gnus.org, Stefan Kangas <stefan <at> marxist.se>,
 marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Wed, 22 Sep 2021 09:01:53 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Stefan Kangas <stefan <at> marxist.se>
>> Date: Tue, 21 Sep 2021 16:22:26 -0700
>> Cc: larsi <at> gnus.org, marcowahlsoft <at> gmail.com
>>
>>     The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
>>     through [C-x C-k Z] are reserved for user bindings, and to bind to
>>     one of these sequences, just enter the digit or letter, rather than
>>     the whole sequence.
>
> Regardless of the main issue here, why does this doc string use this
> strange notation for key sequences?  What is the meaning of the
> brackets here, and why don't we use `..' as usual?

Of course I don't know but I guess the reason for that notation has been
just a lack of knowledge about the usual notation style.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 07:35:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: larsi <at> gnus.org, 50727 <at> debbugs.gnu.org, marcowahlsoft <at> gmail.com
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Wed, 22 Sep 2021 10:34:14 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Tue, 21 Sep 2021 23:53:06 -0700
> Cc: 50727 <at> debbugs.gnu.org, larsi <at> gnus.org, marcowahlsoft <at> gmail.com
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >>     The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
> >>     through [C-x C-k Z] are reserved for user bindings, and to bind to
> >>     one of these sequences, just enter the digit or letter, rather than
> >>     the whole sequence.
> >
> > Regardless of the main issue here, why does this doc string use this
> > strange notation for key sequences?  What is the meaning of the
> > brackets here, and why don't we use `..' as usual?
> 
> AFAICT, there is no particular reason for using that notation here.
> I'll push a fix for that shortly, lumped in with some other checkdoc
> fixes.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50727; Package emacs. (Wed, 22 Sep 2021 19:58:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Marco Wahl <marcowahlsoft <at> gmail.com>
Cc: 50727 <at> debbugs.gnu.org, Gregory Heytings <gregory <at> heytings.org>,
 Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#50727: Contradictory conventions with new command
 kbd-macro-display
Date: Wed, 22 Sep 2021 21:57:10 +0200
Marco Wahl <marcowahlsoft <at> gmail.com> writes:

> What about dropping key sequence C-x C-k Q and use C-x C-k d instead?

I moved it to `C-x C-k d' on the trunk now.

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




bug marked as fixed in version 28.1, send any further explanations to 50727 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 22 Sep 2021 19:58: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. (Thu, 21 Oct 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 160 days ago.

Previous Next


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