GNU bug report logs - #78916
31.0.50; C-g fails to exit loop

Previous Next

Package: emacs;

Reported by: Mike Kupfer <kupfer <at> rawbw.com>

Date: Fri, 27 Jun 2025 21:37:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Pip Cet <pipcet <at> protonmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78916 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, kupfer <at> rawbw.com
Subject: bug#78916: 31.0.50; C-g fails to exit loop
Date: Sat, 05 Jul 2025 08:17:23 +0000
"Eli Zaretskii" <eliz <at> gnu.org> writes:

>> Date: Fri, 04 Jul 2025 18:16:29 +0000
>> From: Pip Cet <pipcet <at> protonmail.com>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 78916 <at> debbugs.gnu.org, kupfer <at> rawbw.com
>>
>> "Stefan Monnier" <monnier <at> iro.umontreal.ca> writes:
>>
>> >> (However, there are other good reason not to apply this patch, and
>> >> simply fix read-key to optionally allow quitting instead.
>> >
>> > That wouldn't fix the `C-]` case.
>>
>> I'm not sure it's that important.  It's not documented in
>> query-replace-help, and I'm not really sure whether it should behave
>> like C-g or ESC (or should ESC be fixed, too?) or any unbound key (like
>> "r").

> C-] is documented in the manual as part of this catch-all:

>      Aside from this, any other character exits the ‘query-replace’, and
>   is then reread as part of a key sequence.  Thus, if you type ‘C-k’, it
>   exits the ‘query-replace’ and then kills to end of line.  In particular,
>   ‘C-g’ simply exits the ‘query-replace’.

That is no longer accurate if we apply Stefan's fix, which will prevent
C-] from being reread over and over again in Mike's loop.  The last
sentence contradicts the rest of it, too: if C-g is reread, it doesn't
simply exit the 'query-replace'.

So the documentation in the manual is contradictory and inaccurate, and
the documentation in query-replace-help is incomplete.

Pip





This bug report was last modified 25 days ago.

Previous Next


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