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: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78916 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, kupfer <at> rawbw.com
Subject: bug#78916: 31.0.50; C-g fails to exit loop
Date: Fri, 04 Jul 2025 18:16:29 +0000
"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").

But, sure, if we want to change the behavior of C-], that requires a
change beyond making C-g quit in our read-key call, because C-] is
ordinary input (and the binding in the map is relevant), unlike C-g.

The C-g case is documented (because C-g is documented for all of Emacs,
and exceptions are noted) and will behave inconsistently (interrupting a
timer in read-key will cause read-key to signal quit; if there's no
timer, we look up the key and perform a (keyboard-quit)) in the current
proposal.  That may or may not be acceptable; adding the may-quit option
to read-key would fix the problem for most callers, including this one,
so it's a better solution.

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.