GNU bug report logs - #73607
30.0.90; Strange behaviour of C-x with define-prefix-command

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Thu, 3 Oct 2024 02:43:01 UTC

Severity: normal

Found in version 30.0.90

Done: Sean Whitton <spwhitton <at> spwhitton.name>

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 73607 in the body.
You can then email your comments to 73607 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 bug-gnu-emacs <at> gnu.org:
bug#73607; Package emacs. (Thu, 03 Oct 2024 02:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 03 Oct 2024 02:43:02 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.90; Strange behaviour of C-x with define-prefix-command
Date: Thu, 03 Oct 2024 10:42:05 +0800
1. emacs -q
2. (global-set-key "\C-z" (define-prefix-command 'foo))
3. C-z C-c => "C-z C-c is undefined" as expected

However:

4. C-z C-x => "C-z C-x- (C-h for help)"
5. C-z C-x C-h => "No commands with a binding that start with C-z C-x."

I am on the pgtk build.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73607; Package emacs. (Thu, 03 Oct 2024 07:07:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 73607 <at> debbugs.gnu.org
Subject: Re: bug#73607: 30.0.90;
 Strange behaviour of C-x with define-prefix-command
Date: Thu, 03 Oct 2024 10:05:56 +0300
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Thu, 03 Oct 2024 10:42:05 +0800
> 
> 1. emacs -q
> 2. (global-set-key "\C-z" (define-prefix-command 'foo))
> 3. C-z C-c => "C-z C-c is undefined" as expected
> 
> However:
> 
> 4. C-z C-x => "C-z C-x- (C-h for help)"
> 5. C-z C-x C-h => "No commands with a binding that start with C-z C-x."

Why is that a problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73607; Package emacs. (Thu, 03 Oct 2024 07:15:02 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73607 <at> debbugs.gnu.org
Subject: Re: bug#73607: 30.0.90; Strange behaviour of C-x with
 define-prefix-command
Date: Thu, 03 Oct 2024 15:13:52 +0800
Hello,

On Thu 03 Oct 2024 at 10:05am +03, Eli Zaretskii wrote:

>> From: Sean Whitton <spwhitton <at> spwhitton.name>
>> Date: Thu, 03 Oct 2024 10:42:05 +0800
>>
>> 1. emacs -q
>> 2. (global-set-key "\C-z" (define-prefix-command 'foo))
>> 3. C-z C-c => "C-z C-c is undefined" as expected
>>
>> However:
>>
>> 4. C-z C-x => "C-z C-x- (C-h for help)"
>> 5. C-z C-x C-h => "No commands with a binding that start with C-z C-x."
>
> Why is that a problem?

It should say "C-z C-x is undefined" right away, like with every other key.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73607; Package emacs. (Thu, 03 Oct 2024 11:23:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 73607 <at> debbugs.gnu.org
Subject: Re: bug#73607: 30.0.90; Strange behaviour of C-x with
 define-prefix-command
Date: Thu, 03 Oct 2024 14:22:43 +0300
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Cc: 73607 <at> debbugs.gnu.org
> Date: Thu, 03 Oct 2024 15:13:52 +0800
> 
> Hello,
> 
> On Thu 03 Oct 2024 at 10:05am +03, Eli Zaretskii wrote:
> 
> >> From: Sean Whitton <spwhitton <at> spwhitton.name>
> >> Date: Thu, 03 Oct 2024 10:42:05 +0800
> >>
> >> 1. emacs -q
> >> 2. (global-set-key "\C-z" (define-prefix-command 'foo))
> >> 3. C-z C-c => "C-z C-c is undefined" as expected
> >>
> >> However:
> >>
> >> 4. C-z C-x => "C-z C-x- (C-h for help)"
> >> 5. C-z C-x C-h => "No commands with a binding that start with C-z C-x."
> >
> > Why is that a problem?
> 
> It should say "C-z C-x is undefined" right away, like with every other key.

C-x is not like other keys, it is handled specially.  I think.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73607; Package emacs. (Thu, 03 Oct 2024 12:00:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73607 <at> debbugs.gnu.org, Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#73607: 30.0.90; Strange behaviour of C-x with
 define-prefix-command
Date: Thu, 03 Oct 2024 13:58:36 +0200
On Okt 03 2024, Eli Zaretskii wrote:

>> >> 1. emacs -q
>> >> 2. (global-set-key "\C-z" (define-prefix-command 'foo))
>> >> 3. C-z C-c => "C-z C-c is undefined" as expected
>> >>
>> >> However:
>> >>
>> >> 4. C-z C-x => "C-z C-x- (C-h for help)"
>> >> 5. C-z C-x C-h => "No commands with a binding that start with C-z C-x."
>> >
>> > Why is that a problem?
>> 
>> It should say "C-z C-x is undefined" right away, like with every other key.
>
> C-x is not like other keys, it is handled specially.  I think.

C-x starts a key translation.  If you type C-z C-x 8 " s you get the
same binding as C-z ß.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Reply sent to Sean Whitton <spwhitton <at> spwhitton.name>:
You have taken responsibility. (Fri, 04 Oct 2024 09:17:01 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Fri, 04 Oct 2024 09:17:02 GMT) Full text and rfc822 format available.

Message #22 received at 73607-close <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 73607-close <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#73607: 30.0.90; Strange behaviour of C-x with
 define-prefix-command
Date: Fri, 04 Oct 2024 17:15:58 +0800
Hello,

On Thu 03 Oct 2024 at 01:58pm +02, Andreas Schwab wrote:

> C-x starts a key translation.  If you type C-z C-x 8 " s you get the
> same binding as C-z ß.

Ah, I see.  Thanks.  I think that this means this is not a bug.

-- 
Sean Whitton




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 01 Nov 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 233 days ago.

Previous Next


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