GNU bug report logs - #21793
Emacs hangs in sh-mode

Previous Next

Package: emacs;

Reported by: "jun" <netjunegg <at> qq.com>

Date: Fri, 30 Oct 2015 16:04:02 UTC

Severity: normal

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.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 21793 in the body.
You can then email your comments to 21793 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#21793; Package emacs. (Fri, 30 Oct 2015 16:04:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "jun" <netjunegg <at> qq.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 30 Oct 2015 16:04:03 GMT) Full text and rfc822 format available.

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

From: "jun" <netjunegg <at> qq.com>
To: "bug-gnu-emacs" <bug-gnu-emacs <at> gnu.org>
Subject: Emacs hangs in sh-mode
Date: Fri, 30 Oct 2015 17:20:10 +0800
[Message part 1 (text/plain, inline)]
Run emacs with "emacs -Q". Open the attached file. Turn on show-paren-mode. 
Then let cursor stay on word "while" or "do". Emacs hangs.

Emacs version: 24.5 on Linux.
[Message part 2 (text/html, inline)]
[test.sh (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21793; Package emacs. (Sat, 31 Oct 2015 06:04:01 GMT) Full text and rfc822 format available.

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

From: Tassilo Horn <tsdh <at> gnu.org>
To: "jun" <netjunegg <at> qq.com>
Cc: 21793 <at> debbugs.gnu.org
Subject: Re: bug#21793: Emacs hangs in sh-mode
Date: Sat, 31 Oct 2015 07:02:53 +0100
"jun" <netjunegg <at> qq.com> writes:

Hi!

> Run emacs with "emacs -Q". Open the attached file. Turn on
> show-paren-mode.  Then let cursor stay on word "while" or "do". Emacs
> hangs.
>
> Emacs version: 24.5 on Linux.
> #!/bin/sh
>
> while [ 1 -gt 0]
> do

I can't reproduce this with emacs 24.5, but given your example and
description, I think this is a duplicate of

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21747

which I have fixed in 1bab3cefc133e06aaf4a48efb1623d1b458ab212.

  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1bab3cefc133e06aaf4a48efb1623d1b458ab212

If you can do that, could you please check if applying that patch to
your sh-script.el fixes the problem?  (Be sure to recompile it
afterwards.)

Bye,
Tassilo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21793; Package emacs. (Mon, 02 Nov 2015 02:08:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 21793 <at> debbugs.gnu.org, jun <netjunegg <at> qq.com>
Subject: Re: bug#21793: Emacs hangs in sh-mode
Date: Sun, 01 Nov 2015 21:07:01 -0500
Hang in 24.5; no hang in current master.
However current master highlights a bunch of things that aren't parens.
Eg the entire word "while" in paren mismatch face.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21793; Package emacs. (Mon, 02 Nov 2015 19:39:01 GMT) Full text and rfc822 format available.

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

From: Tassilo Horn <tsdh <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 21793 <at> debbugs.gnu.org, jun <netjunegg <at> qq.com>
Subject: Re: bug#21793: Emacs hangs in sh-mode
Date: Mon, 02 Nov 2015 20:38:42 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Hang in 24.5; no hang in current master.
> However current master highlights a bunch of things that aren't parens.
> Eg the entire word "while" in paren mismatch face.

I think that's intensional with SMIE, e.g., in sh-mode open/closing
"parens" are "do" and "done", etc.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21793; Package emacs. (Mon, 02 Nov 2015 22:28:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 21793 <at> debbugs.gnu.org, jun <netjunegg <at> qq.com>
Subject: Re: bug#21793: Emacs hangs in sh-mode
Date: Mon, 02 Nov 2015 17:27:23 -0500
Tassilo Horn wrote:

> Glenn Morris <rgm <at> gnu.org> writes:
>
>> Hang in 24.5; no hang in current master.
>> However current master highlights a bunch of things that aren't parens.
>> Eg the entire word "while" in paren mismatch face.
>
> I think that's intensional with SMIE, e.g., in sh-mode open/closing
> "parens" are "do" and "done", etc.

Oh, OK. Seems weird and undocumented to me, but there you go.




bug marked as fixed in version 25.1, send any further explanations to 21793 <at> debbugs.gnu.org and "jun" <netjunegg <at> qq.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 02 Nov 2015 22:29: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. (Tue, 01 Dec 2015 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 205 days ago.

Previous Next


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