GNU bug report logs - #24785
24.5; Shell-script indentation after line continuation

Previous Next

Package: emacs;

Reported by: Karl Wette <karl.wette <at> gmail.com>

Date: Mon, 24 Oct 2016 18:45:02 UTC

Severity: minor

Found in version 24.5

Done: Karl Wette <karl.wette <at> gmail.com>

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 24785 in the body.
You can then email your comments to 24785 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#24785; Package emacs. (Mon, 24 Oct 2016 18:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Wette <karl.wette <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 24 Oct 2016 18:45:02 GMT) Full text and rfc822 format available.

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

From: Karl Wette <karl.wette <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Shell-script indentation after line continuation
Date: Mon, 24 Oct 2016 20:22:22 +0200
In Shell-script mode, indentation after a line continuation seems broken:

aaaaaaaaaaaaaaaaaaaa \
    indents to the correct 4 spaces, but

aaaaaaaaaa aaaaaaaaa \
           indents to the first whitespace in the line

${aaaaaaaaaaa}aaaaa \
              indents to after the closing bracket

( aaaaaaaaa ) && aa \
                     indents to after the line continuation

This seems to be very underisable, and there should at least be an option
of getting back the old behaviour of a fixed indent.




In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-17 on lgw01-04, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
System Description:	Ubuntu 16.04.1 LTS

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
  value of $LC_MONETARY: en_NZ.UTF-8
  value of $LC_NUMERIC: en_NZ.UTF-8
  value of $LC_TIME: en_NZ.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  savehist-mode: t
  global-auto-revert-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-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
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent messages:
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...
Loading cjk-enc...done
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [3 times]
Mark set
Making completion list... [2 times]

Load-path shadows:
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/24.5/lisp/language/thai-word
/usr/share/emacs24/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs24/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs24/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs24/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview
/usr/share/emacs24/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs24/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex
/usr/share/emacs24/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs
/usr/share/emacs24/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs24/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs24/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs24/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs24/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs24/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs24/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs24/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs24/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs24/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs24/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs24/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs24/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs24/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode server package epg-config
savehist reftex reftex-vars easymenu edmacro kmacro cl-loaddefs cl-lib
autorevert filenotify paren delsel dash-functional dash preview-latex
tex-site auto-loads time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd 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 dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 93293 4604)
 (symbols 48 19947 0)
 (miscs 40 67 96)
 (strings 32 17740 4301)
 (string-bytes 1 539892)
 (vectors 16 11128)
 (vector-slots 8 416247 3283)
 (floats 8 76 80)
 (intervals 56 243 0)
 (buffers 960 13)
 (heap 1024 24852 1001))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24785; Package emacs. (Mon, 24 Oct 2016 20:21:01 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Karl Wette <karl.wette <at> gmail.com>, 24785 <at> debbugs.gnu.org
Subject: Re: bug#24785: 24.5; Shell-script indentation after line continuation
Date: Mon, 24 Oct 2016 20:20:26 +0000
[Message part 1 (text/plain, inline)]
Karl Wette <karl.wette <at> gmail.com> schrieb am Mo., 24. Okt. 2016 um
22:04 Uhr:

>
> In Shell-script mode, indentation after a line continuation seems broken:
>
> aaaaaaaaaaaaaaaaaaaa \
>     indents to the correct 4 spaces, but
>
> aaaaaaaaaa aaaaaaaaa \
>            indents to the first whitespace in the line
>
> ${aaaaaaaaaaa}aaaaa \
>               indents to after the closing bracket
>
> ( aaaaaaaaa ) && aa \
>                      indents to after the line continuation
>
> This seems to be very underisable, and there should at least be an option
> of getting back the old behaviour of a fixed indent.
>
>
There is: Set `sh-indent-after-continuation' to 'always.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24785; Package emacs. (Tue, 25 Oct 2016 12:44:01 GMT) Full text and rfc822 format available.

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

From: Karl Wette <karl.wette <at> gmail.com>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 24785 <at> debbugs.gnu.org
Subject: Re: bug#24785: 24.5; Shell-script indentation after line continuation
Date: Tue, 25 Oct 2016 14:42:55 +0200
[Message part 1 (text/plain, inline)]
Thanks. Unfortunately this isn't yet an option in my version of Emacs, but
I'll keep it in mind for the future.

On 24 October 2016 at 22:20, Philipp Stephani <p.stephani2 <at> gmail.com> wrote:

>
>
> Karl Wette <karl.wette <at> gmail.com> schrieb am Mo., 24. Okt. 2016 um
> 22:04 Uhr:
>
>>
>> In Shell-script mode, indentation after a line continuation seems broken:
>>
>> aaaaaaaaaaaaaaaaaaaa \
>>     indents to the correct 4 spaces, but
>>
>> aaaaaaaaaa aaaaaaaaa \
>>            indents to the first whitespace in the line
>>
>> ${aaaaaaaaaaa}aaaaa \
>>               indents to after the closing bracket
>>
>> ( aaaaaaaaa ) && aa \
>>                      indents to after the line continuation
>>
>> This seems to be very underisable, and there should at least be an option
>> of getting back the old behaviour of a fixed indent.
>>
>>
> There is: Set `sh-indent-after-continuation' to 'always.
>
[Message part 2 (text/html, inline)]

bug closed, send any further explanations to 24785 <at> debbugs.gnu.org and Karl Wette <karl.wette <at> gmail.com> Request was from Karl Wette <karl.wette <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 25 Oct 2016 12:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24785; Package emacs. (Tue, 25 Oct 2016 14:12:01 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Karl Wette <karl.wette <at> gmail.com>
Cc: 24785 <at> debbugs.gnu.org
Subject: Re: bug#24785: 24.5; Shell-script indentation after line continuation
Date: Tue, 25 Oct 2016 14:11:03 +0000
[Message part 1 (text/plain, inline)]
Karl Wette <karl.wette <at> gmail.com> schrieb am Di., 25. Okt. 2016 um
14:43 Uhr:

> Thanks. Unfortunately this isn't yet an option in my version of Emacs, but
> I'll keep it in mind for the future.
>
>
>
For older versions you can use sh-use-smie to nil.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 23 Nov 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 213 days ago.

Previous Next


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