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

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 4 Jan 2017 11:29:02 UTC

Severity: minor

Merged with 21321, 31609

Found in versions 24.5, 25.3

To reply to this bug, email your comments to 25353 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#25353; Package emacs. (Wed, 04 Jan 2017 11:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Jan 2017 11:29:02 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: Shell-script[bash] mode not ready for extglob
Date: Wed, 04 Jan 2017 17:59:52 +0800
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




Merged 21321 25353 31609. Request was from Glenn Morris <rgm <at> fencepost.gnu.org> to control <at> debbugs.gnu.org. (Tue, 11 Jan 2022 16:50:01 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 160 days ago.

Previous Next


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