GNU bug report logs -
#30937
In `comment-region', C-g doesn't work.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sun, 25 Mar 2018 14:49:01 UTC
Severity: normal
Tags: moreinfo, unreproducible
Done: Stefan Kangas <stefan <at> marxist.se>
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 30937 in the body.
You can then email your comments to 30937 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 14:49:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alan Mackenzie <acm <at> muc.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 25 Mar 2018 14:49:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, Emacs.
emacs-26.0.91 -Q
C-x C-f Any largish file.c
C-x h ; mark buffer.
C-c C-c ; comment-region.
This is the sort of thing that can happen by accident. Depending on the
size of the file.c and the speed of your machine, you've now got a long,
long wait. C-g doesn't work. This is a bug.
(The same applies to `uncomment-region'.)
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 15:33:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30937 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 25 Mar 2018 14:28:55 +0000
> From: Alan Mackenzie <acm <at> muc.de>
>
> emacs-26.0.91 -Q
> C-x C-f Any largish file.c
> C-x h ; mark buffer.
> C-c C-c ; comment-region.
>
> This is the sort of thing that can happen by accident. Depending on the
> size of the file.c and the speed of your machine, you've now got a long,
> long wait. C-g doesn't work. This is a bug.
C-g does work for me just fine in the above recipe. Maybe it's
platform dependent, and the problem happens only on X?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 16:00:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 30937 <at> debbugs.gnu.org (full text, mbox):
Hello, Eli.
On Sun, Mar 25, 2018 at 18:32:10 +0300, Eli Zaretskii wrote:
> > Date: Sun, 25 Mar 2018 14:28:55 +0000
> > From: Alan Mackenzie <acm <at> muc.de>
> > emacs-26.0.91 -Q
> > C-x C-f Any largish file.c
> > C-x h ; mark buffer.
> > C-c C-c ; comment-region.
> > This is the sort of thing that can happen by accident. Depending on the
> > size of the file.c and the speed of your machine, you've now got a long,
> > long wait. C-g doesn't work. This is a bug.
> C-g does work for me just fine in the above recipe. Maybe it's
> platform dependent, and the problem happens only on X?
Yes, I've just tried it on X. It works there (except it leaves point in
a suboptimal position: the starting point. It should really leave point
after the last newly commented line when the quit happened). It works
on emacs -nw, with the same proviso.
It doesn't work at all on a Linux tty. Sorry I didn't try X before
reporting the bug.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 16:08:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 30937 <at> debbugs.gnu.org (full text, mbox):
On Mär 25 2018, Alan Mackenzie <acm <at> muc.de> wrote:
> emacs-26.0.91 -Q
> C-x C-f Any largish file.c
> C-x h ; mark buffer.
> C-c C-c ; comment-region.
>
> This is the sort of thing that can happen by accident. Depending on the
> size of the file.c and the speed of your machine, you've now got a long,
> long wait. C-g doesn't work. This is a bug.
Does it help to set select-active-regions to nil or 'only?
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 16:21:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 30937 <at> debbugs.gnu.org (full text, mbox):
Hello, Andreas.
On Sun, Mar 25, 2018 at 18:07:00 +0200, Andreas Schwab wrote:
> On Mär 25 2018, Alan Mackenzie <acm <at> muc.de> wrote:
> > emacs-26.0.91 -Q
> > C-x C-f Any largish file.c
> > C-x h ; mark buffer.
> > C-c C-c ; comment-region.
> > This is the sort of thing that can happen by accident. Depending on the
> > size of the file.c and the speed of your machine, you've now got a long,
> > long wait. C-g doesn't work. This is a bug.
> Does it help to set select-active-regions to nil or 'only?
Sort of, yes. But I run with transient-mark-mode disabled, and on a
Linux tty. What has select-active-regions got to do with my platform?
> Andreas.
> --
> Andreas Schwab, schwab <at> linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 16:49:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 30937 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 25 Mar 2018 15:39:59 +0000
> Cc: 30937 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
>
> Yes, I've just tried it on X. It works there (except it leaves point in
> a suboptimal position: the starting point. It should really leave point
> after the last newly commented line when the quit happened). It works
> on emacs -nw, with the same proviso.
>
> It doesn't work at all on a Linux tty.
??? How come it works in "emacs -nw" but not on a "Linux tty" (which
is what, btw? the raw Linux console?). In both cases, C-g should
trigger a SIGINT, so Emacs should be even more responsive to C-g than
on X. What am I missing?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 17:35:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 30937 <at> debbugs.gnu.org (full text, mbox):
Hello, Eli.
On Sun, Mar 25, 2018 at 19:48:00 +0300, Eli Zaretskii wrote:
> > Date: Sun, 25 Mar 2018 15:39:59 +0000
> > Cc: 30937 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>
> > Yes, I've just tried it on X. It works there (except it leaves point in
> > a suboptimal position: the starting point. It should really leave point
> > after the last newly commented line when the quit happened). It works
> > on emacs -nw, with the same proviso.
> > It doesn't work at all on a Linux tty.
> ??? How come it works in "emacs -nw" but not on a "Linux tty" (which
> is what, btw? the raw Linux console?).
Yes, the raw Linux console. I don't know why it doesn't work, here.
> In both cases, C-g should trigger a SIGINT, so Emacs should be even
> more responsive to C-g than on X.
For what it's worth, quit-flag is getting set on a C-g (I hacked up my
own quit mechanism to test this). It would appear that nothing is
testing quit-flag during the comment-region.
> What am I missing?
I honestly don't know.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 17:36:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 30937 <at> debbugs.gnu.org (full text, mbox):
>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>>> From: Alan Mackenzie <acm <at> muc.de>
>> Yes, I've just tried it on X. It works there (except it leaves
>> point in a suboptimal position: the starting point. It should
>> really leave point after the last newly commented line when the quit
>> happened). It works on emacs -nw, with the same proviso.
>> It doesn't work at all on a Linux tty.
> ??? How come it works in "emacs -nw" but not on a "Linux tty" (which
> is what, btw? the raw Linux console?). In both cases, C-g should
> trigger a SIGINT, so Emacs should be even more responsive to C-g than
> on X. What am I missing?
I’d think that it means “works with -nw under xterm [or some
such] but not on a virtual terminal [like /dev/tty2]”.
Personally, I’d look at (and compare) the stty(1) settings for
the respective tty devices first; like:
$ stty -a -F /dev/tty2
$ stty -a -F /dev/pts/5
--
FSF associate member #7257 http://am-1.org/~ivan/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 18:09:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 30937 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 25 Mar 2018 17:15:10 +0000
> Cc: 30937 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
>
> > In both cases, C-g should trigger a SIGINT, so Emacs should be even
> > more responsive to C-g than on X.
>
> For what it's worth, quit-flag is getting set on a C-g (I hacked up my
> own quit mechanism to test this). It would appear that nothing is
> testing quit-flag during the comment-region.
comment-region doesn't need to test that explicitly, it is tested in
many underlying primitives. Moreover, on a TTY, C-g triggers a
SIGINT, which should cause a throw to top-level even if quit-flag is
not tested, just because it's a signal.
Can you see if SIGINT is delivered to Emacs when you type C-g on that
console?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 18:12:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 30937 <at> debbugs.gnu.org (full text, mbox):
> From: Ivan Shmakov <ivan <at> siamics.net>
> Date: Sun, 25 Mar 2018 17:35:45 +0000
>
> > ??? How come it works in "emacs -nw" but not on a "Linux tty" (which
> > is what, btw? the raw Linux console?). In both cases, C-g should
> > trigger a SIGINT, so Emacs should be even more responsive to C-g than
> > on X. What am I missing?
>
> I’d think that it means “works with -nw under xterm [or some
> such] but not on a virtual terminal [like /dev/tty2]”.
>
> Personally, I’d look at (and compare) the stty(1) settings for
> the respective tty devices first; like:
>
> $ stty -a -F /dev/tty2
>
> $ stty -a -F /dev/pts/5
If a SIGINT is disabled, then I'd expect Emacs on a TTY to become
completely broken wrt to C-g, because AFAIK there's no other mechanism
on a TTY for Emacs to treat C-g differently from any other key.
But it doesn't do any harm to check the stty settings.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 18:44:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 30937 <at> debbugs.gnu.org (full text, mbox):
On Mär 25 2018, Eli Zaretskii <eliz <at> gnu.org> wrote:
> comment-region doesn't need to test that explicitly, it is tested in
> many underlying primitives. Moreover, on a TTY, C-g triggers a
> SIGINT, which should cause a throw to top-level even if quit-flag is
> not tested, just because it's a signal.
SIGINT only sets quit-flag. If you want it to take effect you need to
call maybe_quit.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 19:15:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 30937 <at> debbugs.gnu.org (full text, mbox):
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: Alan Mackenzie <acm <at> muc.de>, 30937 <at> debbugs.gnu.org
> Date: Sun, 25 Mar 2018 20:43:15 +0200
>
> SIGINT only sets quit-flag.
No, sometimes it also calls quit_throw_to_read_char.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sun, 25 Mar 2018 21:09:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 30937 <at> debbugs.gnu.org (full text, mbox):
On Mär 25 2018, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Andreas Schwab <schwab <at> linux-m68k.org>
>> Cc: Alan Mackenzie <acm <at> muc.de>, 30937 <at> debbugs.gnu.org
>> Date: Sun, 25 Mar 2018 20:43:15 +0200
>>
>> SIGINT only sets quit-flag.
>
> No, sometimes it also calls quit_throw_to_read_char.
Only while waiting for input, thus it cannot arbitrarily interrupt the
Lisp interpreter.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Sat, 31 Mar 2018 14:22:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 30937 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> Hello, Eli.
>
> On Sun, Mar 25, 2018 at 18:32:10 +0300, Eli Zaretskii wrote:
>> > Date: Sun, 25 Mar 2018 14:28:55 +0000
>> > From: Alan Mackenzie <acm <at> muc.de>
>
>> > emacs-26.0.91 -Q
>> > C-x C-f Any largish file.c
>> > C-x h ; mark buffer.
>> > C-c C-c ; comment-region.
>
>> > This is the sort of thing that can happen by accident. Depending on the
>> > size of the file.c and the speed of your machine, you've now got a long,
>> > long wait. C-g doesn't work. This is a bug.
>
>> C-g does work for me just fine in the above recipe. Maybe it's
>> platform dependent, and the problem happens only on X?
>
> Yes, I've just tried it on X. It works there (except it leaves point in
> a suboptimal position: the starting point. It should really leave point
> after the last newly commented line when the quit happened). It works
> on emacs -nw, with the same proviso.
>
> It doesn't work at all on a Linux tty. Sorry I didn't try X before
> reporting the bug.
I'm not able to reproduce this on a Linux tty (I assume that means the
virtual terminal you get when pressing Ctrl+Alt+F1).
Added tag(s) unreproducible and moreinfo.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 05 Apr 2018 23:02:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Wed, 09 Jan 2019 01:08:01 GMT)
Full text and
rfc822 format available.
Message #49 received at 30937 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky wrote:
> I'm not able to reproduce this on a Linux tty (I assume that means the
> virtual terminal you get when pressing Ctrl+Alt+F1).
Me neither. I tried on two different systems.
My suggestion is to close this report, since it has been months and
it doesn't seem to be leading anywhere.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30937
; Package
emacs
.
(Thu, 10 Jan 2019 11:32:02 GMT)
Full text and
rfc822 format available.
Message #52 received at 30937 <at> debbugs.gnu.org (full text, mbox):
Hello, Glenn.
On Tue, Jan 08, 2019 at 20:06:59 -0500, Glenn Morris wrote:
> Noam Postavsky wrote:
> > I'm not able to reproduce this on a Linux tty (I assume that means the
> > virtual terminal you get when pressing Ctrl+Alt+F1).
> Me neither. I tried on two different systems.
> My suggestion is to close this report, since it has been months and
> it doesn't seem to be leading anywhere.
OK, I won't object to closing this bug report, since the bug doesn't
seem to be happening (on Emacs 26.1 and master) at the moment. I would
object to labelling the closure "not a bug" or "won't fix".
I do, however, raise an eyebrow at the "doesn't seem to be leading
anywhere" justification. Bugs, particularly difficult bugs (as this one
is) tend "not to be leading anywhere" for a lot of their life times. It
would be bad just to close such bugs for such reasons, rather than deal
with them.
On a Linux tty, this problem of C-g being non-functional happens to me
relatively often (several times a year), resulting in me having to kill
Emacs and start it again. Unfortunately I haven't logged these
occurrences at all. I strongly believe there is a problem in the
keyboard handling area of Emacs, though pinning it down is difficult.
--
Alan Mackenzie (Nuremberg, Germany).
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Sat, 02 Nov 2019 00:54:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alan Mackenzie <acm <at> muc.de>
:
bug acknowledged by developer.
(Sat, 02 Nov 2019 00:54:02 GMT)
Full text and
rfc822 format available.
Message #57 received at 30937-done <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> Hello, Glenn.
>
> On Tue, Jan 08, 2019 at 20:06:59 -0500, Glenn Morris wrote:
>> Noam Postavsky wrote:
>
>> > I'm not able to reproduce this on a Linux tty (I assume that means the
>> > virtual terminal you get when pressing Ctrl+Alt+F1).
>
>> Me neither. I tried on two different systems.
>
>> My suggestion is to close this report, since it has been months and
>> it doesn't seem to be leading anywhere.
>
> OK, I won't object to closing this bug report, since the bug doesn't
> seem to be happening (on Emacs 26.1 and master) at the moment. I would
> object to labelling the closure "not a bug" or "won't fix".
Thanks, I'm consequently closing this bug report.
Best regards,
Stefan Kangas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 30 Nov 2019 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.