From unknown Mon Aug 18 15:39:13 2025 X-Loop: don@donarmstrong.com Subject: bug#1320: sh-mode indentation of "case $foo in (bar)" Reply-To: Karl Chen , 1320-quiet@debbugs.gnu.org Resent-From: Karl Chen Original-Sender: Glenn Morris Resent-To: Resent-Date: Sun, 09 Nov 2008 21:30:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1320 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by quiet@emacsbugs.donarmstrong.com id=Q.122626576129447 (code Q ref -1); Sun, 09 Nov 2008 21:30:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SUBJMONEY,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at quiet) by emacsbugs.donarmstrong.com; 9 Nov 2008 21:22:41 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA9LMbI4029434 for ; Sun, 9 Nov 2008 13:22:39 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KzHgy-0000ZH-Jx for quiet@emacsbugs.donarmstrong.com; Sun, 09 Nov 2008 16:19:32 -0500 From: Karl Chen To: quiet@debbugs.gnu.org Date: Fri, 31 Oct 2008 03:29:13 -0700 Lines: 59 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Fri Oct 31 06:27:21 2008 Received: from mx10.gnu.org ([199.232.76.166]:35149) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KvrDt-0002rZ-37 for rgm@gnu.org; Fri, 31 Oct 2008 06:27:21 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KvrGd-0007oU-7P for rgm@gnu.org; Fri, 31 Oct 2008 06:30:12 -0400 Received: from lists.gnu.org ([199.232.76.165]:53794) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvrGc-0007oC-Pf for rgm@gnu.org; Fri, 31 Oct 2008 06:30:10 -0400 Received: from localhost ([127.0.0.1]:46243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvrGc-0000SB-76 for rgm@gnu.org; Fri, 31 Oct 2008 06:30:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvrFq-0000Re-Jw for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvrFo-0000QE-8A for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:21 -0400 Received: from [199.232.76.173] (port=35277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvrFo-0000Q4-3g for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:20 -0400 Received: from roar.cs.berkeley.edu ([128.32.36.242]:49603 helo=roar.quarl.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvrFn-0007Uh-Mi for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:19 -0400 Received: by roar.quarl.org (Postfix, from userid 18378) id E8CAA343E4; Fri, 31 Oct 2008 03:29:13 -0700 (PDT) X-Quack-Archive: 1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+rgm=gnu.org@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Glenn Morris [ resent from http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00906.html ] emacs -Q /tmp/case.sh # case x in y) y2 ;; (z) z2 ;; esac M-: (indent-region (point-min) (point-max)) Result: # case x in y) y2 ;; (z) z2 ;; esac Expected: # case x in y) y2 ;; (z) z2 ;; esac Running (sh-get-indent-info) on the y2 line includes sh-indent-for-case-alt in the result (as expected); running (sh-get-indent-info) on the z2 line doesn't yield sh-indent-for-case-alt. The "(altpattern)" syntax with leading opening parenthesis is supported by various shells (bash, ksh, zsh). Also, a second indentation bug: if the first line in the buffer is the case statement, sh-mode gets even more confused and double-indents the y2 line. This is rare though since usually the first line is "#!"; I only noticed it while constructing this bug report. Tested on emacs 22.2 and emacs 2008-10-31. From unknown Mon Aug 18 15:39:13 2025 X-Loop: don@donarmstrong.com Subject: bug#1320: Your mailbox is over its size limit Reply-To: "Nabi, Ghulam" , 1320-quiet@debbugs.gnu.org Resent-From: "Nabi, Ghulam" Resent-To: Resent-Date: Sun, 30 Nov 2008 01:35:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1320 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1320-quiet@emacsbugs.donarmstrong.com id=Q1320.122800841332049 (code Q ref 1320); Sun, 30 Nov 2008 01:35:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: ** X-Spam-Status: No, score=2.9 required=4.0 tests=BAYES_80,FB_MORE_SIZE, HTML_MESSAGE,RCVD_IN_DNSWL_MED,YOUTHERE autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1320-quiet) by emacsbugs.donarmstrong.com; 30 Nov 2008 01:26:53 +0000 Received: from mailhub1.abdn.ac.uk (mailhub1.abdn.ac.uk [139.133.7.28]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAU1QnHt032043 for <1320-quiet@emacsbugs.donarmstrong.com>; Sat, 29 Nov 2008 17:26:51 -0800 Received: from uo-mail-3.uoa.abdn.ac.uk ([139.133.15.93] helo=mail.abdn.ac.uk) by mailhub1.abdn.ac.uk with esmtp (Exim 4.52) id 1L6b3S-000177-1W; Sun, 30 Nov 2008 01:24:58 +0000 Received: from VMAILB.uoa.abdn.ac.uk ([139.133.15.82]) by uo-mail-3.uoa.abdn.ac.uk ([139.133.15.93]) with mapi; Sun, 30 Nov 2008 01:24:57 +0000 From: "Nabi, Ghulam" Date: Sun, 30 Nov 2008 01:24:56 +0000 Thread-Topic: Your mailbox is over its size limit Thread-Index: AQHJUop0OYix+Svi+kSOwb+SpjDfmA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_A3317CA649BC8C4998EED327D66A8D95501E0C22E6VMAILBuoaabdn_" MIME-Version: 1.0 To: undisclosed-recipients:; --_000_A3317CA649BC8C4998EED327D66A8D95501E0C22E6VMAILBuoaabdn_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Your mailbox has exceeded one or more size limits set by your administrator= . You may not be able to receive new mail until you reduce your mailbox siz= e. To make more space available, contact your System Administrator through = E-mail with your USERNAME:{ } and PASSWORD: { } System Administrator E-mail: sysaccount@live.com Nabi, Ghulam You will continue to receive this warning message periodically if your inbo= x size continues to exceed its size limit. This email is intended only for the use of the individual or entity to whic= h it is addressed and contains information that is privileged and confident= ial. The University of Aberdeen is a charity registered in Scotland, No SC013683= . --_000_A3317CA649BC8C4998EED327D66A8D95501E0C22E6VMAILBuoaabdn_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
=  
Your mailbox has exceeded one or more= size limits set by your administrator. You may not be able to receive new = mail until you reduce your mailbox size. To make more space available, cont= act your System Administrator through E-mail with your USERNAME:{ } and PASSWORD: { }
 
System Administrator
E-mail: sysaccount@live.com
Nabi, Ghulam
 
You will continue to receive this war= ning message periodically if your inbox size continues to exceed its size l= imit.

This email is intended only for the use of the individual or entity to whic= h it is addressed and contains information that is privileged and confident= ial.


The University of Aberdeen is a charity registered in Scotland, No SC013683= .
--_000_A3317CA649BC8C4998EED327D66A8D95501E0C22E6VMAILBuoaabdn_-- From unknown Mon Aug 18 15:39:13 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Karl Chen Subject: bug#1320 closed by Chong Yidong (Re: sh-mode indentation of "case $foo in (bar)") Message-ID: References: <871vks332g.fsf@stupidchicken.com> X-Emacs-PR-Message: they-closed 1320 X-Emacs-PR-Package: emacs Reply-To: 1320@debbugs.gnu.org Date: Sat, 24 Oct 2009 21:25:06 +0000 Content-Type: multipart/mixed; boundary="----------=_1256419506-14717-1" This is a multi-part message in MIME format... ------------=_1256419506-14717-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1320: sh-mode indentation of "case $foo in (bar)" It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1320: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1320 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1256419506-14717-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1320-done) by emacsbugs.donarmstrong.com; 24 Oct 2009 21:16:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.5 required=4.0 tests=AWL,SUBJMONEY autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po43.its.yale.edu (pantheon-po43.its.yale.edu [130.132.50.104]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9OLGkR1013959 for <1320-done@emacsbugs.donarmstrong.com>; Sat, 24 Oct 2009 14:16:47 -0700 Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n9OLGdfh028764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 24 Oct 2009 17:16:39 -0400 Received: by furry (Postfix, from userid 1000) id 7B0D4C070; Sat, 24 Oct 2009 17:16:39 -0400 (EDT) From: Chong Yidong To: Karl Chen Cc: 1320-done@debbugs.gnu.org Subject: Re: sh-mode indentation of "case $foo in (bar)" Date: Sat, 24 Oct 2009 17:16:39 -0400 Message-ID: <871vks332g.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > # > case x in > y) > y2 > ;; > (z) > z2 > ;; > esac > > Running (sh-get-indent-info) on the y2 line includes > sh-indent-for-case-alt in the result (as expected); running > (sh-get-indent-info) on the z2 line doesn't yield > sh-indent-for-case-alt. Sorry for the late response. I've checked in a fix for this problem into Emacs CVS. ------------=_1256419506-14717-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From rgm@gnu.org Sun Nov 9 13:22:41 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SUBJMONEY,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at quiet) by emacsbugs.donarmstrong.com; 9 Nov 2008 21:22:41 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA9LMbI4029434 for ; Sun, 9 Nov 2008 13:22:39 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KzHgy-0000ZH-Jx for quiet@emacsbugs.donarmstrong.com; Sun, 09 Nov 2008 16:19:32 -0500 From: Karl Chen To: quiet@debbugs.gnu.org Subject: sh-mode indentation of "case $foo in (bar)" Date: Fri, 31 Oct 2008 03:29:13 -0700 Lines: 59 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Fri Oct 31 06:27:21 2008 Received: from mx10.gnu.org ([199.232.76.166]:35149) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KvrDt-0002rZ-37 for rgm@gnu.org; Fri, 31 Oct 2008 06:27:21 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KvrGd-0007oU-7P for rgm@gnu.org; Fri, 31 Oct 2008 06:30:12 -0400 Received: from lists.gnu.org ([199.232.76.165]:53794) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvrGc-0007oC-Pf for rgm@gnu.org; Fri, 31 Oct 2008 06:30:10 -0400 Received: from localhost ([127.0.0.1]:46243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvrGc-0000SB-76 for rgm@gnu.org; Fri, 31 Oct 2008 06:30:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvrFq-0000Re-Jw for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvrFo-0000QE-8A for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:21 -0400 Received: from [199.232.76.173] (port=35277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvrFo-0000Q4-3g for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:20 -0400 Received: from roar.cs.berkeley.edu ([128.32.36.242]:49603 helo=roar.quarl.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvrFn-0007Uh-Mi for emacs-devel@gnu.org; Fri, 31 Oct 2008 06:29:19 -0400 Received: by roar.quarl.org (Postfix, from userid 18378) id E8CAA343E4; Fri, 31 Oct 2008 03:29:13 -0700 (PDT) X-Quack-Archive: 1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+rgm=gnu.org@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Debbugs-No-Ack: yes Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Glenn Morris [ resent from http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00906.html ] emacs -Q /tmp/case.sh # case x in y) y2 ;; (z) z2 ;; esac M-: (indent-region (point-min) (point-max)) Result: # case x in y) y2 ;; (z) z2 ;; esac Expected: # case x in y) y2 ;; (z) z2 ;; esac Running (sh-get-indent-info) on the y2 line includes sh-indent-for-case-alt in the result (as expected); running (sh-get-indent-info) on the z2 line doesn't yield sh-indent-for-case-alt. The "(altpattern)" syntax with leading opening parenthesis is supported by various shells (bash, ksh, zsh). Also, a second indentation bug: if the first line in the buffer is the case statement, sh-mode gets even more confused and double-indents the y2 line. This is rare though since usually the first line is "#!"; I only noticed it while constructing this bug report. Tested on emacs 22.2 and emacs 2008-10-31. ------------=_1256419506-14717-1--