GNU bug report logs - #22112
24.5; lockup in shell-script-mode with missing newline at eof

Previous Next

Package: emacs;

Reported by: Tony Finch <dot <at> dotat.at>

Date: Tue, 8 Dec 2015 00:14:01 UTC

Severity: normal

Tags: moreinfo

Merged with 19852, 22381, 23445

Found in versions 24.5, 25.0.50

Fixed in versions 25.1, 25.1.50.1

Done: Alan J Third <alan <at> idiocy.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 22112 in the body.
You can then email your comments to 22112 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#22112; Package emacs. (Tue, 08 Dec 2015 00:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tony Finch <dot <at> dotat.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Dec 2015 00:14:02 GMT) Full text and rfc822 format available.

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

From: Tony Finch <dot <at> dotat.at>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; lockup in shell-script-mode with missing newline at eof
Date: Mon, 7 Dec 2015 23:13:14 +0000
In an empty shell-script buffer, I type
	i
        f
        left

This causes emacs to lock up, consuming CPU in a tight loop without
responding to the user interface.

The problem occurs when there is an "if" statement on the last line of
the buffer, and the buffer does not end in a newline. The "if" does not
have to be right at the end of the buffer - there can be a conditional
command. Movement or editing attempts around this line usually cause a
lockup.

Standard rubric follows...

In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
of 2015-04-10 on builder10-9.porkrind.org
Windowing system distributor `Apple', version 10.3.1404
Configured using:
`configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp''

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Shell-script

Minor modes in effect:
  sh-electric-here-document-mode: t
  show-paren-mode: t
  global-whitespace-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Wrote /Users/fanf/.emacs
Mark set
Mark activated [2 times]
t.sh has auto save data; consider M-x recover-this-file
Setting up indent for shell type sh
Indentation variables are now local.
Indentation setup for shell type sh
Quit
Buffer *unsent mail to bug-gnu-emacs <at> gnu.org* modified; kill anyway? (y or n) y
Making completion list...

Load-path shadows:
None found.

Features:
(sh-script smie executable mule-util vc-git jka-compr find-func
help-mode pp shadow sort gnus-util mail-extr emacsbug message
format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils fanf-theme
go-mode-autoloads lua-mode derived advice help-fns edmacro kmacro
cl-macs compile rx comint ansi-color ring cl gv cl-loaddefs cl-lib paren
whitespace cus-start cus-load time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 111756 13871)
(symbols 48 20921 0)
(miscs 40 138 265)
(strings 32 20354 3268)
(string-bytes 1 560447)
(vectors 16 13116)
(vector-slots 8 422660 7712)
(floats 8 65 365)
(intervals 56 877 210)
(buffers 960 20))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22112; Package emacs. (Tue, 08 Dec 2015 01:35:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Tony Finch <dot <at> dotat.at>
Cc: 22112 <at> debbugs.gnu.org
Subject: Re: bug#22112: 24.5;
 lockup in shell-script-mode with missing newline at eof
Date: Mon, 07 Dec 2015 20:34:15 -0500
Tony Finch wrote:

> In an empty shell-script buffer, I type
> 	i
>         f
>         left
>
> This causes emacs to lock up, consuming CPU in a tight loop without
> responding to the user interface.

I'm unable to reproduce this with:

  emacs-24.5 -Q foo.sh




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22112; Package emacs. (Mon, 21 Dec 2015 11:27:01 GMT) Full text and rfc822 format available.

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

From: Alan J Third <alan <at> idiocy.org>
To: Tony Finch <dot <at> dotat.at>
Cc: 22112 <at> debbugs.gnu.org
Subject: Re: bug#22112: 24.5;
 lockup in shell-script-mode with missing newline at eof
Date: Mon, 21 Dec 2015 11:26:23 +0000
Tony Finch <dot <at> dotat.at> writes:

> In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
> of 2015-04-10 on builder10-9.porkrind.org

I believe I'm running the exact same build:

"GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2015-04-10 on builder10-9.porkrind.org"

but I can't reproduce this either. If you run emacs using

/Applications/Emacs.app/Contents/MacOS/Emacs -Q

Does it still happen?

--
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22112; Package emacs. (Fri, 08 Jan 2016 13:36:01 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Tony Finch <dot <at> dotat.at>
Cc: 22112 <at> debbugs.gnu.org
Subject: Re: bug#22112: 24.5; lockup in shell-script-mode with missing newline
 at eof
Date: Fri, 8 Jan 2016 13:35:22 +0000
[Message part 1 (text/plain, inline)]
I've managed to replicate this on a Windows PC: GNU Emacs 24.5.1
(i686-pc-mingw32) of 2015-04-11 on LEG570

Run emacs -Q

Evaluate:

    (show-paren-mode +1)

Open a new shell script buffer:

    C-x b test <RET> M-x shell-script-mode

and type:

    if<left arrow>

If I don't turn on show-paren-mode there is no hang and Emacs carries on
happily.
-- 
Alan Third
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22112; Package emacs. (Fri, 08 Jan 2016 16:35:04 GMT) Full text and rfc822 format available.

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

From: Tony Finch <dot <at> dotat.at>
To: Alan Third <alan <at> idiocy.org>
Cc: 22112 <at> debbugs.gnu.org
Subject: Re: bug#22112: 24.5; lockup in shell-script-mode with missing newline
 at eof
Date: Fri, 8 Jan 2016 13:49:47 +0000
Alan Third <alan <at> idiocy.org> wrote:

> If I don't turn on show-paren-mode there is no hang and Emacs carries on
> happily.

Excellent, thanks for pursuing this. Yes, I had show-paren-mode on.

Sorry I wasn't able to find the time to pin it down myself.

Tony.
-- 
f.anthony.n.finch  <dot <at> dotat.at>  http://dotat.at/
South Utsire, Forties, Cromarty: Cyclonic, mainly southeasterly, 6 to gale 8,
decreasing 4 or 5 at times. Rough or very rough, occasionally moderate later.
Rain or sleet. Good, occasionally poor.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22112; Package emacs. (Fri, 08 Jan 2016 20:14:02 GMT) Full text and rfc822 format available.

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

From: Alan J Third <alan <at> idiocy.org>
To: Tony Finch <dot <at> dotat.at>
Cc: 22112 <at> debbugs.gnu.org
Subject: Re: bug#22112: 24.5;
 lockup in shell-script-mode with missing newline at eof
Date: Fri, 08 Jan 2016 20:13:21 +0000
Alan Third <alan <at> idiocy.org> writes:

> I've managed to replicate this on a Windows PC: GNU Emacs 24.5.1
> (i686-pc-mingw32) of 2015-04-11 on LEG570
>
> Run emacs -Q
>
> Evaluate:
>
> (show-paren-mode +1)
>
> Open a new shell script buffer:
>
> C-x b test <RET> M-x shell-script-mode
>
> and type:
>
> if<left arrow>
>
> If I don't turn on show-paren-mode there is no hang and Emacs carries
> on happily.

I can't reproduce this against Emacs 25.1.50.1 so I'm marking it as
fixed. If you later upgrade and it's still broken for you, please
reopen the bug.

-- 
Alan Third




bug marked as fixed in version 25.1.50.1, send any further explanations to 22112 <at> debbugs.gnu.org and Tony Finch <dot <at> dotat.at> Request was from Alan J Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Sat, 09 Jan 2016 00:04:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22112; Package emacs. (Sat, 09 Jan 2016 00:46:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Alan J Third <alan <at> idiocy.org>
Cc: 22112 <at> debbugs.gnu.org
Subject: Re: Processed: bug#22112
Date: Fri, 08 Jan 2016 19:45:20 -0500
GNU bug tracker automated control server wrote:

> Processing commands for control <at> debbugs.gnu.org:
>
>> close 22112 25.1.50.1

It's not worth changing now, but the right version number to use would
be "25.1", since that is the first release in which this will be fixed.

"25.1.50" is a fairly meaningless development version that applies to a
huge range of git revisions. The final ".1" is a build number that is
irrelevant.




Forcibly Merged 22112 22381. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 16 Jan 2016 01:58: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. (Sat, 13 Feb 2016 12:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 04 May 2016 15:42:02 GMT) Full text and rfc822 format available.

Merged 19852 22112 22381 23445. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 04 May 2016 15:42: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. (Sat, 04 Jun 2016 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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