unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document
@ 2014-07-15 22:20 Ian Kelling
  2021-05-29  4:19 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Kelling @ 2014-07-15 22:20 UTC (permalink / raw)
  To: 18029


emacs -Q the following files, then use indent region on the whole buffer:
(indent-region (point-min) (point-max)) Similar indent commands will work the
same. This is how they get indented:

#!/bin/bash
if true; then
    true <<'EOF'
[ line beginning with one of [{( 
EOF
fi

if true; then
    true
    # comment containing a single quote 'true
           fi
            true
            


The true commands could be other things, they are just an example. I assume the
if statements could be other things which create indents. The final fi and
anything beyond it get bad indenting that is determined by the quote in the
first quote from 'EOF' Another variation of this bug:


#!/bin/bash
if true; then
    true <<EOF
[ line beginning with one of [{( 
EOF
fi

if true; then
    true
    # comment containing a single quote 'true
                                        fi
                                         true
                                         

The final fi and beyond's indenting is determined by the quote in 'true.  





In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
 of 2014-07-14 on treetowl
Repository revision: 117533 eggert@cs.ucla.edu-20140714192318-v0rrw2b8evo2wue4
Windowing system distributor `Fedora Project', version 11.0.11404000
Configured using:
 `configure --enable-link-time-optimization 'CFLAGS=-std=gnu99 -g3 -O2''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Shell-script

Minor modes in effect:
  sh-electric-here-document-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
  line-number-mode: t

Recent input:
M-x r e p o r t - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
r has auto save data; consider M-x recover-this-file
Setting up indent for shell type bash
Indentation variables are now local.
Indentation setup for shell type bash

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired 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 help-fns mail-prsvr mail-utils sh-script smie
executable 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 83313 7281)
 (symbols 48 18389 0)
 (miscs 40 39 124)
 (strings 32 12921 4377)
 (string-bytes 1 335173)
 (vectors 16 10129)
 (vector-slots 8 404842 13811)
 (floats 8 68 68)
 (intervals 56 193 1)
 (buffers 960 12)
 (heap 1024 35157 980))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document
  2014-07-15 22:20 bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document Ian Kelling
@ 2021-05-29  4:19 ` Lars Ingebrigtsen
  2021-06-07 17:57   ` Ian Kelling
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-29  4:19 UTC (permalink / raw)
  To: Ian Kelling; +Cc: 18029

Ian Kelling <ian@iankelling.org> writes:

> emacs -Q the following files, then use indent region on the whole buffer:
> (indent-region (point-min) (point-max)) Similar indent commands will work the
> same. This is how they get indented:
>
> #!/bin/bash
> if true; then
>     true <<'EOF'
> [ line beginning with one of [{( 
> EOF
> fi
>
> if true; then
>     true
>     # comment containing a single quote 'true
>            fi
>             true

(I'm going through old bug reports that unfortunately got no response at
the time.)

I'm unable to reproduce this in Emacs 28, and Emacs 25.1 is the oldest
one I have, and I can't reproduce it there, either.

But Noam tagged this as reproduced in Emacs 25.2.

Are you still seeing this problem in more recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document
  2021-05-29  4:19 ` Lars Ingebrigtsen
@ 2021-06-07 17:57   ` Ian Kelling
  2021-06-07 18:04     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Kelling @ 2021-06-07 17:57 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 18029


Lars Ingebrigtsen <larsi@gnus.org> writes:

> Ian Kelling <ian@iankelling.org> writes:
>
>> emacs -Q the following files, then use indent region on the whole buffer:
>> (indent-region (point-min) (point-max)) Similar indent commands will work the
>> same. This is how they get indented:
>>
>> #!/bin/bash
>> if true; then
>>     true <<'EOF'
>> [ line beginning with one of [{( 
>> EOF
>> fi
>>
>> if true; then
>>     true
>>     # comment containing a single quote 'true
>>            fi
>>             true
>
> (I'm going through old bug reports that unfortunately got no response at
> the time.)
>
> I'm unable to reproduce this in Emacs 28, and Emacs 25.1 is the oldest
> one I have, and I can't reproduce it there, either.
>
> But Noam tagged this as reproduced in Emacs 25.2.
>
> Are you still seeing this problem in more recent Emacs versions?

Originally reported in 24.4.50.1, but I'm in a much more recent version
and it doesn't repro. It's been fixed! Thank you for checking up on this
and please close this bug.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document
  2021-06-07 17:57   ` Ian Kelling
@ 2021-06-07 18:04     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-07 18:04 UTC (permalink / raw)
  To: Ian Kelling; +Cc: 18029

Ian Kelling <ian@iankelling.org> writes:

> Originally reported in 24.4.50.1, but I'm in a much more recent version
> and it doesn't repro. It's been fixed! Thank you for checking up on this
> and please close this bug.

Thanks for checking; closing this bug report then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-07 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 22:20 bug#18029: 24.4.50; bad shell-script-mode indentation due to ^[{([] in a here document Ian Kelling
2021-05-29  4:19 ` Lars Ingebrigtsen
2021-06-07 17:57   ` Ian Kelling
2021-06-07 18:04     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).