GNU bug report logs - #40076
26.3; [shell script mode/bash] Wrong indentation for extended pattern "case" switches

Previous Next

Package: emacs;

Reported by: Bruno Raoult <braoult <at> gmail.com>

Date: Sun, 15 Mar 2020 13:38:02 UTC

Severity: minor

Tags: confirmed

Found in versions 26.3, 28.0.50

To reply to this bug, email your comments to 40076 AT debbugs.gnu.org.

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#40076; Package emacs. (Sun, 15 Mar 2020 13:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Raoult <braoult <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 15 Mar 2020 13:38:02 GMT) Full text and rfc822 format available.

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

From: Bruno Raoult <braoult <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: braoult <at> gmail.com
Subject: 26.3; [shell script mode/bash] Wrong indentation for extended pattern
 "case" switches
Date: Sun, 15 Mar 2020 10:13:34 +0100
I have an issue with indentation of "case" switches containing extended patterns
such as +(pattern-list). Same occurs with "emacs -Q".

Below if an example of indentation I get:
========================================
#!/bin/bash
shopt -s extglob

case $1 in
    A)
        echo indent OK. case 'A'
        ;;
    [a-z])
        echo indent OK. Case '[a-z]'
        ;;
    +([1-9]))
             echo indent NOK. Case '+([1-9])', extended pattern.
             ;;
             *)
                 echo still NOK. Case '*', after extended pattern
                 ;;
             esac # still NOK
========================================

My configuration for shell-script mode is:

(add-hook
 'sh-mode-hook
 (lambda ()
   (setq indent-tabs-mode nil
         sh-basic-offset 4
         comment-column 50
         comment-auto-fill-only-comments t
         fill-column 128
         auto-fill-mode t)))


In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.11)
 of 2019-09-23, modified by Debian built on lgw01-amd64-032
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
System Description:	Ubuntu 19.10

Recent messages:
250 2.1.5 Ok [2 times]
354 End data with <CR><LF>.<CR><LF>
Sending email 
250 2.0.0 Ok: queued as E75B24347E
Sending email done
221 2.0.0 Bye
Sending...done
Setting up indent for shell type bash
Indentation variables are now local.
Indentation setup for shell type bash

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 --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
 --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs-wvqver/emacs-26.3+1=.
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2

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

Major mode: Shell-script

Minor modes in effect:
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  helm-mode: t
  helm--remap-mouse-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  override-global-mode: t
  minibuffer-depth-indicate-mode: t
  delete-selection-mode: t
  recentf-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  projectile-mode: t
  global-atomic-chrome-edit-mode: t
  tooltip-mode: t
  global-eldoc-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-fill-mode: t
  hs-minor-mode: t

Load-path shadows:
/home/br/.emacs.d/elpa/org-9.3.6/org-id hides /usr/share/emacs/26.3/lisp/org/org-id
/home/br/.emacs.d/elpa/org-9.3.6/org-datetree hides /usr/share/emacs/26.3/lisp/org/org-datetree
/home/br/.emacs.d/elpa/org-9.3.6/org-attach hides /usr/share/emacs/26.3/lisp/org/org-attach
/home/br/.emacs.d/elpa/org-9.3.6/ob-css hides /usr/share/emacs/26.3/lisp/org/ob-css
/home/br/.emacs.d/elpa/org-9.3.6/ob-lua hides /usr/share/emacs/26.3/lisp/org/ob-lua
/home/br/.emacs.d/elpa/org-9.3.6/ox-latex hides /usr/share/emacs/26.3/lisp/org/ox-latex
/home/br/.emacs.d/elpa/org-9.3.6/ob-gnuplot hides /usr/share/emacs/26.3/lisp/org/ob-gnuplot
/home/br/.emacs.d/elpa/org-9.3.6/ob-dot hides /usr/share/emacs/26.3/lisp/org/ob-dot
/home/br/.emacs.d/elpa/org-9.3.6/ob-asymptote hides /usr/share/emacs/26.3/lisp/org/ob-asymptote
/home/br/.emacs.d/elpa/org-9.3.6/ob-screen hides /usr/share/emacs/26.3/lisp/org/ob-screen
/home/br/.emacs.d/elpa/org-9.3.6/ob-org hides /usr/share/emacs/26.3/lisp/org/ob-org
/home/br/.emacs.d/elpa/org-9.3.6/ob-java hides /usr/share/emacs/26.3/lisp/org/ob-java
/home/br/.emacs.d/elpa/org-9.3.6/ob-makefile hides /usr/share/emacs/26.3/lisp/org/ob-makefile
/home/br/.emacs.d/elpa/org-9.3.6/org-timer hides /usr/share/emacs/26.3/lisp/org/org-timer
/home/br/.emacs.d/elpa/org-9.3.6/ob-sqlite hides /usr/share/emacs/26.3/lisp/org/ob-sqlite
/home/br/.emacs.d/elpa/org-9.3.6/ox-icalendar hides /usr/share/emacs/26.3/lisp/org/ox-icalendar
/home/br/.emacs.d/elpa/org-9.3.6/org-macs hides /usr/share/emacs/26.3/lisp/org/org-macs
/home/br/.emacs.d/elpa/org-9.3.6/org-agenda hides /usr/share/emacs/26.3/lisp/org/org-agenda
/home/br/.emacs.d/elpa/org-9.3.6/org-ctags hides /usr/share/emacs/26.3/lisp/org/org-ctags
/home/br/.emacs.d/elpa/org-9.3.6/org-plot hides /usr/share/emacs/26.3/lisp/org/org-plot
/home/br/.emacs.d/elpa/org-9.3.6/ob-groovy hides /usr/share/emacs/26.3/lisp/org/ob-groovy
/home/br/.emacs.d/elpa/org-9.3.6/ob-core hides /usr/share/emacs/26.3/lisp/org/ob-core
/home/br/.emacs.d/elpa/org-9.3.6/org-compat hides /usr/share/emacs/26.3/lisp/org/org-compat
/home/br/.emacs.d/elpa/org-9.3.6/ob-eval hides /usr/share/emacs/26.3/lisp/org/ob-eval
/home/br/.emacs.d/elpa/org-9.3.6/org-feed hides /usr/share/emacs/26.3/lisp/org/org-feed
/home/br/.emacs.d/elpa/org-9.3.6/org-colview hides /usr/share/emacs/26.3/lisp/org/org-colview
/home/br/.emacs.d/elpa/org-9.3.6/ob-R hides /usr/share/emacs/26.3/lisp/org/ob-R
/home/br/.emacs.d/elpa/org-9.3.6/ob-haskell hides /usr/share/emacs/26.3/lisp/org/ob-haskell
/home/br/.emacs.d/elpa/org-9.3.6/org hides /usr/share/emacs/26.3/lisp/org/org
/home/br/.emacs.d/elpa/org-9.3.6/ob hides /usr/share/emacs/26.3/lisp/org/ob
/home/br/.emacs.d/elpa/org-9.3.6/ob-scheme hides /usr/share/emacs/26.3/lisp/org/ob-scheme
/home/br/.emacs.d/elpa/org-9.3.6/ob-shen hides /usr/share/emacs/26.3/lisp/org/ob-shen
/home/br/.emacs.d/elpa/org-9.3.6/ob-ruby hides /usr/share/emacs/26.3/lisp/org/ob-ruby
/home/br/.emacs.d/elpa/org-9.3.6/org-install hides /usr/share/emacs/26.3/lisp/org/org-install
/home/br/.emacs.d/elpa/org-9.3.6/ob-latex hides /usr/share/emacs/26.3/lisp/org/ob-latex
/home/br/.emacs.d/elpa/org-9.3.6/ob-maxima hides /usr/share/emacs/26.3/lisp/org/ob-maxima
/home/br/.emacs.d/elpa/org-9.3.6/ob-js hides /usr/share/emacs/26.3/lisp/org/ob-js
/home/br/.emacs.d/elpa/org-9.3.6/org-protocol hides /usr/share/emacs/26.3/lisp/org/org-protocol
/home/br/.emacs.d/elpa/org-9.3.6/ob-perl hides /usr/share/emacs/26.3/lisp/org/ob-perl
/home/br/.emacs.d/elpa/org-9.3.6/org-lint hides /usr/share/emacs/26.3/lisp/org/org-lint
/home/br/.emacs.d/elpa/org-9.3.6/ob-calc hides /usr/share/emacs/26.3/lisp/org/ob-calc
/home/br/.emacs.d/elpa/org-9.3.6/ob-shell hides /usr/share/emacs/26.3/lisp/org/ob-shell
/home/br/.emacs.d/elpa/org-9.3.6/org-clock hides /usr/share/emacs/26.3/lisp/org/org-clock
/home/br/.emacs.d/elpa/org-9.3.6/ob-vala hides /usr/share/emacs/26.3/lisp/org/ob-vala
/home/br/.emacs.d/elpa/org-9.3.6/ob-J hides /usr/share/emacs/26.3/lisp/org/ob-J
/home/br/.emacs.d/elpa/org-9.3.6/org-mouse hides /usr/share/emacs/26.3/lisp/org/org-mouse
/home/br/.emacs.d/elpa/org-9.3.6/org-pcomplete hides /usr/share/emacs/26.3/lisp/org/org-pcomplete
/home/br/.emacs.d/elpa/org-9.3.6/ob-emacs-lisp hides /usr/share/emacs/26.3/lisp/org/ob-emacs-lisp
/home/br/.emacs.d/elpa/org-9.3.6/org-macro hides /usr/share/emacs/26.3/lisp/org/org-macro
/home/br/.emacs.d/elpa/org-9.3.6/ob-octave hides /usr/share/emacs/26.3/lisp/org/ob-octave
/home/br/.emacs.d/elpa/org-9.3.6/org-crypt hides /usr/share/emacs/26.3/lisp/org/org-crypt
/home/br/.emacs.d/elpa/org-9.3.6/ob-tangle hides /usr/share/emacs/26.3/lisp/org/ob-tangle
/home/br/.emacs.d/elpa/org-9.3.6/ox-odt hides /usr/share/emacs/26.3/lisp/org/ox-odt
/home/br/.emacs.d/elpa/org-9.3.6/ox-texinfo hides /usr/share/emacs/26.3/lisp/org/ox-texinfo
/home/br/.emacs.d/elpa/org-9.3.6/ox-md hides /usr/share/emacs/26.3/lisp/org/ox-md
/home/br/.emacs.d/elpa/org-9.3.6/ob-C hides /usr/share/emacs/26.3/lisp/org/ob-C
/home/br/.emacs.d/elpa/org-9.3.6/ob-lisp hides /usr/share/emacs/26.3/lisp/org/ob-lisp
/home/br/.emacs.d/elpa/org-9.3.6/org-table hides /usr/share/emacs/26.3/lisp/org/org-table
/home/br/.emacs.d/elpa/org-9.3.6/ob-processing hides /usr/share/emacs/26.3/lisp/org/ob-processing
/home/br/.emacs.d/elpa/org-9.3.6/ob-ebnf hides /usr/share/emacs/26.3/lisp/org/ob-ebnf
/home/br/.emacs.d/elpa/org-9.3.6/org-archive hides /usr/share/emacs/26.3/lisp/org/org-archive
/home/br/.emacs.d/elpa/org-9.3.6/ob-hledger hides /usr/share/emacs/26.3/lisp/org/ob-hledger
/home/br/.emacs.d/elpa/org-9.3.6/ob-plantuml hides /usr/share/emacs/26.3/lisp/org/ob-plantuml
/home/br/.emacs.d/elpa/org-9.3.6/ob-stan hides /usr/share/emacs/26.3/lisp/org/ob-stan
/home/br/.emacs.d/elpa/org-9.3.6/ob-matlab hides /usr/share/emacs/26.3/lisp/org/ob-matlab
/home/br/.emacs.d/elpa/org-9.3.6/ob-comint hides /usr/share/emacs/26.3/lisp/org/ob-comint
/home/br/.emacs.d/elpa/org-9.3.6/ob-picolisp hides /usr/share/emacs/26.3/lisp/org/ob-picolisp
/home/br/.emacs.d/elpa/org-9.3.6/ox-html hides /usr/share/emacs/26.3/lisp/org/ox-html
/home/br/.emacs.d/elpa/org-9.3.6/ob-lilypond hides /usr/share/emacs/26.3/lisp/org/ob-lilypond
/home/br/.emacs.d/elpa/org-9.3.6/ob-io hides /usr/share/emacs/26.3/lisp/org/ob-io
/home/br/.emacs.d/elpa/org-9.3.6/org-habit hides /usr/share/emacs/26.3/lisp/org/org-habit
/home/br/.emacs.d/elpa/org-9.3.6/ox-org hides /usr/share/emacs/26.3/lisp/org/ox-org
/home/br/.emacs.d/elpa/org-9.3.6/org-src hides /usr/share/emacs/26.3/lisp/org/org-src
/home/br/.emacs.d/elpa/org-9.3.6/ox hides /usr/share/emacs/26.3/lisp/org/ox
/home/br/.emacs.d/elpa/org-9.3.6/ob-lob hides /usr/share/emacs/26.3/lisp/org/ob-lob
/home/br/.emacs.d/elpa/org-9.3.6/ob-abc hides /usr/share/emacs/26.3/lisp/org/ob-abc
/home/br/.emacs.d/elpa/org-9.3.6/ob-ledger hides /usr/share/emacs/26.3/lisp/org/ob-ledger
/home/br/.emacs.d/elpa/org-9.3.6/ob-sass hides /usr/share/emacs/26.3/lisp/org/ob-sass
/home/br/.emacs.d/elpa/org-9.3.6/ob-awk hides /usr/share/emacs/26.3/lisp/org/ob-awk
/home/br/.emacs.d/elpa/org-9.3.6/org-capture hides /usr/share/emacs/26.3/lisp/org/org-capture
/home/br/.emacs.d/elpa/org-9.3.6/ob-forth hides /usr/share/emacs/26.3/lisp/org/ob-forth
/home/br/.emacs.d/elpa/org-9.3.6/org-inlinetask hides /usr/share/emacs/26.3/lisp/org/org-inlinetask
/home/br/.emacs.d/elpa/org-9.3.6/ob-table hides /usr/share/emacs/26.3/lisp/org/ob-table
/home/br/.emacs.d/elpa/org-9.3.6/ob-mscgen hides /usr/share/emacs/26.3/lisp/org/ob-mscgen
/home/br/.emacs.d/elpa/org-9.3.6/org-footnote hides /usr/share/emacs/26.3/lisp/org/org-footnote
/home/br/.emacs.d/elpa/org-9.3.6/ob-sql hides /usr/share/emacs/26.3/lisp/org/ob-sql
/home/br/.emacs.d/elpa/org-9.3.6/ox-man hides /usr/share/emacs/26.3/lisp/org/ox-man
/home/br/.emacs.d/elpa/org-9.3.6/ob-exp hides /usr/share/emacs/26.3/lisp/org/ob-exp
/home/br/.emacs.d/elpa/org-9.3.6/ob-ocaml hides /usr/share/emacs/26.3/lisp/org/ob-ocaml
/home/br/.emacs.d/elpa/org-9.3.6/ob-python hides /usr/share/emacs/26.3/lisp/org/ob-python
/home/br/.emacs.d/elpa/org-9.3.6/org-mobile hides /usr/share/emacs/26.3/lisp/org/org-mobile
/home/br/.emacs.d/elpa/org-9.3.6/ob-sed hides /usr/share/emacs/26.3/lisp/org/ob-sed
/home/br/.emacs.d/elpa/org-9.3.6/ob-ref hides /usr/share/emacs/26.3/lisp/org/ob-ref
/home/br/.emacs.d/elpa/org-9.3.6/org-list hides /usr/share/emacs/26.3/lisp/org/org-list
/home/br/.emacs.d/elpa/org-9.3.6/org-loaddefs hides /usr/share/emacs/26.3/lisp/org/org-loaddefs
/home/br/.emacs.d/elpa/org-9.3.6/ox-publish hides /usr/share/emacs/26.3/lisp/org/ox-publish
/home/br/.emacs.d/elpa/org-9.3.6/org-duration hides /usr/share/emacs/26.3/lisp/org/org-duration
/home/br/.emacs.d/elpa/org-9.3.6/ox-ascii hides /usr/share/emacs/26.3/lisp/org/ox-ascii
/home/br/.emacs.d/elpa/org-9.3.6/ob-fortran hides /usr/share/emacs/26.3/lisp/org/ob-fortran
/home/br/.emacs.d/elpa/org-9.3.6/org-entities hides /usr/share/emacs/26.3/lisp/org/org-entities
/home/br/.emacs.d/elpa/org-9.3.6/ob-ditaa hides /usr/share/emacs/26.3/lisp/org/ob-ditaa
/home/br/.emacs.d/elpa/org-9.3.6/org-element hides /usr/share/emacs/26.3/lisp/org/org-element
/home/br/.emacs.d/elpa/org-9.3.6/ob-clojure hides /usr/share/emacs/26.3/lisp/org/ob-clojure
/home/br/.emacs.d/elpa/org-9.3.6/ob-coq hides /usr/share/emacs/26.3/lisp/org/ob-coq
/home/br/.emacs.d/elpa/org-9.3.6/org-faces hides /usr/share/emacs/26.3/lisp/org/org-faces
/home/br/.emacs.d/elpa/org-9.3.6/org-version hides /usr/share/emacs/26.3/lisp/org/org-version
/home/br/.emacs.d/elpa/org-9.3.6/org-indent hides /usr/share/emacs/26.3/lisp/org/org-indent
/home/br/.emacs.d/elpa/org-9.3.6/ox-beamer hides /usr/share/emacs/26.3/lisp/org/ox-beamer
/home/br/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /usr/share/emacs/26.3/lisp/emacs-lisp/let-alist

Features:
(shadow sort emacsbug mail-extr smtpmail mailclient mailalias sendmail
erc-pcomplete erc-goodies erc erc-backend erc-compat mc-mark-more
multiple-cursors-core rect ert ewoc debug flycheck autoload tar-mode
lisp-mnt mm-archive network-stream starttls url-cache minibuf-eldef
eieio-opt speedbar sb-image ezimage dframe pp cl-print help-fns
radix-tree misearch multi-isearch helm-command helm-elisp helm-eval
edebug helm-info sh-script smie executable image-file helm-external
helm-net browse-url xml ffap winner vc-git smartparens-python python
tramp-sh tramp tramp-compat tramp-loaddefs trampver ucs-normalize ol-eww
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader ol-docview
doc-view jka-compr image-mode ol-bibtex bibtex ol-bbdb ol-w3m cc-styles
cc-align cc-engine cc-vars mic-paren hideshow smartparens-html web-mode
disp-table sanityinc-tomorrow-blue-theme color-theme-sanityinc-tomorrow
smartparens-config smartparens-org smartparens-markdown smartparens-text
smartparens cc-defs vimrc-mode ob-shell ob-ruby ob-python ob-plantuml
ob-perl ob-calc calc-store calc-trail calc-ext calc calc-loaddefs
calc-macs ox-mediawiki ox-odt rng-loc rng-uri rng-parse rng-match rng-dt
rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox org-element org ob
ob-tangle ob-ref ob-lob ob-table org-macro org-footnote org-src
ob-comint org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp org-table org-keys org-loaddefs find-func cal-menu
calendar cal-loaddefs avl-tree generator ol ob-exp ob-core org-compat
ob-eval org-macs undo-tree diff ido helm-mode helm-projectile helm-files
helm-tags helm-buffers helm-occur helm-grep helm-regexp helm-utils
helm-locate helm-help helm-types helm helm-source eieio-compat
helm-multi-match helm-lib helm-config helm-easymenu use-package-bind-key
yasnippet elec-pair bind-key mb-depth avoid time delsel hl-line
icomplete magithub magithub-dash magithub-notification magithub-orgs
magithub-issue-tricks magithub-issue-post magithub-edit-mode
magithub-repo magithub-ci magithub-issue magithub-label magithub-user
magithub-core magithub-faces magithub-settings recentf tree-widget
parse-time markdown-mode color noutline outline bug-reference ghub+
apiwrap apropos ghub-graphql treepy gsexp ghub url-http tls url-gw nsm
url-auth gnutls url url-proxy url-privacy url-expand url-methods
url-history mailcap s magit-submodule magit-obsolete magit-popup
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode
diff-mode magit-core magit-autorevert autorevert filenotify magit-margin
magit-transient magit-process magit-mode git-commit transient magit-git
magit-section magit-utils crm log-edit message rmc puny dired
dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp advice
async pcase shell pcomplete server use-package-ensure diminish
projectile grep compile comint ansi-color ring ibuf-ext ibuffer
ibuffer-loaddefs thingatpt use-package-diminish auto-package-update dash
cus-edit cus-start cus-load wid-edit cl-extra help-mode use-package-core
ibuf-macs atomic-chrome easy-mmode edmacro kmacro websocket url-cookie
url-domsuf url-util bindat subr-x let-alist json map cl finder-inf rx
info package easymenu epg-config url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars
seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded 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 threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 1715002 151558)
 (symbols 48 68475 1)
 (miscs 40 797 2744)
 (strings 32 280389 18172)
 (string-bytes 1 10802257)
 (vectors 16 113549)
 (vector-slots 8 2230216 131658)
 (floats 8 562 1117)
 (intervals 56 153372 996)
 (buffers 992 61))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40076; Package emacs. (Sun, 23 Aug 2020 12:35:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Bruno Raoult <braoult <at> gmail.com>
Cc: 40076 <at> debbugs.gnu.org
Subject: Re: bug#40076: 26.3; [shell script mode/bash] Wrong indentation for
 extended pattern "case" switches
Date: Sun, 23 Aug 2020 08:34:14 -0400
severity 40076 minor
found 40076 28.0.50
tags 40076 + confirmed
thanks

Bruno Raoult <braoult <at> gmail.com> writes:

> I have an issue with indentation of "case" switches containing extended patterns
> such as +(pattern-list). Same occurs with "emacs -Q".
>
> Below if an example of indentation I get:
> ========================================
> #!/bin/bash
> shopt -s extglob
>
> case $1 in
>     A)
>         echo indent OK. case 'A'
>         ;;
>     [a-z])
>         echo indent OK. Case '[a-z]'
>         ;;
>     +([1-9]))
>              echo indent NOK. Case '+([1-9])', extended pattern.
>              ;;
>              *)
>                  echo still NOK. Case '*', after extended pattern
>                  ;;
>              esac # still NOK
> ========================================

I can reproduce this on current master starting from "emacs -Q".

Best regards,
Stefan Kangas




Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 23 Aug 2020 12:35:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 28.0.50. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 23 Aug 2020 12:35:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 23 Aug 2020 12:35:02 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 302 days ago.

Previous Next


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