GNU bug report logs - #25353
Shell-script[bash] mode not ready for extglob

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: 積丹尼 Dan Jacobson <jidanni@HIDDEN>; merged with #21321, #31609; dated Wed, 4 Jan 2017 11:29:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 21321 25353 31609. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jan 2017 11:28:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 06:28:31 2017
Received: from localhost ([127.0.0.1]:40766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cOjk7-0006CF-FA
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2017 06:28:31 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35234)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1cOjk6-0006C2-CX
 for submit <at> debbugs.gnu.org; Wed, 04 Jan 2017 06:28:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1cOjk0-00055q-0i
 for submit <at> debbugs.gnu.org; Wed, 04 Jan 2017 06:28:25 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:60483)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1cOjjz-00055T-Tj
 for submit <at> debbugs.gnu.org; Wed, 04 Jan 2017 06:28:23 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54432)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1cOjjy-0008NW-QE
 for bug-gnu-emacs@HIDDEN; Wed, 04 Jan 2017 06:28:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1cOjjv-00051P-O7
 for bug-gnu-emacs@HIDDEN; Wed, 04 Jan 2017 06:28:22 -0500
Received: from homie.mail.dreamhost.com ([208.97.132.208]:38786
 helo=homiemail-a7.g.dreamhost.com)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1cOjjv-0004zy-Ef
 for bug-gnu-emacs@HIDDEN; Wed, 04 Jan 2017 06:28:19 -0500
Received: from homiemail-a7.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a7.g.dreamhost.com (Postfix) with ESMTP id 1455925C071
 for <bug-gnu-emacs@HIDDEN>; Wed,  4 Jan 2017 03:28:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 jidanni.org; bh=u8tKXrJ0R0hWwLJ0LaSqTiT915Q=; b=lx68iPQgUdthWWHp
 aQSt6GJy/cl6VUkaowMC9K3oftj1WaLVvG9eMA273Tkao17J2cFBOTewd/E/Rhzj
 Xd4BlmUcoVjxt/7qxCXNkuOkYzZ/5A+05wxdMZ48FRO5olfTAssbZt9MrWYYPDgG
 yJyJNjdXByw/m+Ex8s4tM+AKZ7g=
Received: from jidanni.org (114-41-19-143.dynamic.hinet.net [114.41.19.143])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by homiemail-a7.g.dreamhost.com (Postfix) with ESMTPSA id CD07825C06D
 for <bug-gnu-emacs@HIDDEN>; Wed,  4 Jan 2017 03:28:13 -0800 (PST)
From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Subject: Shell-script[bash] mode not ready for extglob
Date: Wed, 04 Jan 2017 17:59:52 +0800
Message-ID: <87a8b7b0x3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Doing
 C-x h [mark-whole-buffer]
 <tab> [indent-for-tab-command]
just makes indentation out of whack, here where we use shopt -s extglob
patterns. emacs-version "25.1.1".


#!/bin/sh
b=256 t=10000
shopt -s extglob
while read cid
do
    echo -n "$cid: "
    case $cid in
	+([0-9])-[0-9][0-9])
			    printf "%d\n" $((${cid%-*} * 256 + ${cid#*-}))
			    for i in 01 11 21 31 41 51
			    do printf "%d %s\n" $((${cid%-*} * 256 + i)) $i
			    done
			    ;;
			    +([0-9]))
				     printf "%06d-%02d\n" $((cid / b)) $((cid % b))
				     printf "%02d-%04d-%02d\n" $((cid / b / t))  $((cid / b % t)) $((cid % b))
				     ;;
				     *) echo '???' 1>&2; exit 11;
					;;
				     esac
done




Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#25353; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 11 Jan 2022 17:00:02 UTC

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