GNU bug report logs - #19455
24.4; sh-mode highlighting breaks with ZSH glob modifiers

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; Reported by: Jonathan H <pythonnut@HIDDEN>; Keywords: patch; dated Sun, 28 Dec 2014 03:05:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug Marked as found in versions 25.1.50. Request was from Alex <agrambot@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) patch. Request was from Alex <agrambot@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 19455) by debbugs.gnu.org; 14 Aug 2016 04:26:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 14 00:26:19 2016
Received: from localhost ([127.0.0.1]:56707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bYn07-0005tT-BD
	for submit <at> debbugs.gnu.org; Sun, 14 Aug 2016 00:26:19 -0400
Received: from mail-it0-f52.google.com ([209.85.214.52]:35163)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <agrambot@HIDDEN>)
 id 1bYn05-0005t7-Dg; Sun, 14 Aug 2016 00:26:17 -0400
Received: by mail-it0-f52.google.com with SMTP id u186so17341087ita.0;
 Sat, 13 Aug 2016 21:26:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=8a9KLzAlmQjtwng6uw1YylsPwemVHIgon8zwnqh/uLE=;
 b=nk0Iaf+Qn3+D+CjaF4f0eI2ml6rDZ8Dwmd8K3+ptRE+/1BMBEBOVG0ZuZ9+Jm1VGhi
 0bS7FF9K+B37pLQaxsMYxvwbKMI4gqtm61suAqggTiE4jky7EMTKxIsHjR+IhWgK5GOx
 d/yHiaqOMBLVJRkZyWRkdjxHmNb1zdjdj3BFB+JqlJMWdcLDaj/HbL7s8CLtQCxMMmCX
 GfPPAlCkwWvCE6/1BU5ZS1EBY+CH5Hz4XXZKcGd2FRE0rHrKgRedWOfrOPLwXO56JPL2
 v56WJFenzO4ALLOA6P4hJmaA2sYCzQkAcZ3rCkrJg25kuI302FuqdVb0QHgq5BImqtLE
 LlWg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=8a9KLzAlmQjtwng6uw1YylsPwemVHIgon8zwnqh/uLE=;
 b=iupaW4CNXjXejkfcMDpiLCg7dexXoSEp/TDbuiqwFHeSc5M/+uoDTb90SR2Y75t65p
 22bYQGjiIvRnQtXmPezljYM1HkZod+2OI5hf2qS7Dnc8zTd7ZH+5ELD4u65vdIRcrrNc
 MzpRi+OgHbyaHrz0cciXMeDz8mNajM3TqtvFYALrHj+JJQaMNZo7D8qV2IItMxWAoxfF
 RkuiYw2Ax8Y+VP7HHylBPFFJdGEMRRBG3qaCa2CKZrZP7gIF+Cc2SJnD21G+yPe5j8Lq
 xQ8hWG/pN+Ho18kUQCywaIX+tjw3S/I0fi2D+jnKfjEIWdfIWfy3ZDIjKsfdtOBFA64k
 Ko6A==
X-Gm-Message-State: AEkoouuZ+csTCtUkFojICp8Pa6VY3GK7iiqIC5+RkAsOeygDTdavExi+M4e4U4bUyrRwjA==
X-Received: by 10.36.239.197 with SMTP id i188mr6535054ith.71.1471148771944;
 Sat, 13 Aug 2016 21:26:11 -0700 (PDT)
Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88])
 by smtp.gmail.com with ESMTPSA id v7sm4592261itd.6.2016.08.13.21.26.10
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 13 Aug 2016 21:26:11 -0700 (PDT)
From: Alex <agrambot@HIDDEN>
To: Jonathan H <pythonnut@HIDDEN>
Subject: Re: bug#19455: 24.4;
 sh-mode highlighting breaks with ZSH glob modifiers
References: <CAAW2-ZeD8S=FK0i1TJ8xifa+TBje6MH1ZTrvSoHfR_KTH7nweQ@HIDDEN>
Date: Sat, 13 Aug 2016 22:26:04 -0600
In-Reply-To: <CAAW2-ZeD8S=FK0i1TJ8xifa+TBje6MH1ZTrvSoHfR_KTH7nweQ@HIDDEN>
 (Jonathan H.'s message of "Sat, 27 Dec 2014 19:03:56 -0800")
Message-ID: <87lh003rj7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19455
Cc: 19455 <at> debbugs.gnu.org
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: -0.7 (/)


tags 19455 patch
found 19455 25.1.50
quit

I was just about to report a similar issue. My issue was with a
zsh-specific substitution, such as:

echo ${$(some_function)#*.}

The patch provided fixed that for me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19455; Package emacs. Full text available.

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


Received: (at 19455) by debbugs.gnu.org; 21 Feb 2016 02:08:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 20 21:08:33 2016
Received: from localhost ([127.0.0.1]:35698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXJRp-0000V8-4K
	for submit <at> debbugs.gnu.org; Sat, 20 Feb 2016 21:08:33 -0500
Received: from mail-io0-f173.google.com ([209.85.223.173]:34403)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <pythonnut@HIDDEN>) id 1aXJRn-0000Uv-Kt
 for 19455 <at> debbugs.gnu.org; Sat, 20 Feb 2016 21:08:31 -0500
Received: by mail-io0-f173.google.com with SMTP id 9so146696479iom.1
 for <19455 <at> debbugs.gnu.org>; Sat, 20 Feb 2016 18:08:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:from:date:message-id:subject:to:content-type;
 bh=jCc0GWuXaQXeKAU+jz2D0oc8p1RMvyfcyJBWN3w2E4E=;
 b=c9NG93LcTiumYS4w5udp2BjNSbc5k7PUzCLYupgHMBVWR9GtIyoci6Gb0HDCe7twR/
 iZSZTjeia/0PG+AAXeB3nppehKZwxaHDluIf3leY20E59O17A83bj/E8d8DlTL6NdDOx
 mpVBx0J8ZuLK0ee6ZAFlGqO13pdzppkMFhjucVoZkY2/0nulps71JitwYZr6Npx3eEy8
 ONxjqCkHki8o1uC4Dh3lDqkJqlBdXFNst9KC3TA4dkEDUX5Mk+4urfLw7yzCFae+DdNe
 fw8MInwb6bVEUB6qmcD0vhx+iqV9wQOpYJhg/RAvC5CVGUJdNLelKYPhGa4OLq14CkU7
 6OAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to
 :content-type;
 bh=jCc0GWuXaQXeKAU+jz2D0oc8p1RMvyfcyJBWN3w2E4E=;
 b=jRNXNSsE477pRD5MZqP7DI9ZewKQo+RO9u3K5ExHC5p6dwMI8hLMcc5md9WFRel1CC
 qRoFoqvVPRmiV8fPVtpM9UCLF2AKfTrWH1V79wWVxU/RIOfoFHpnTUTi083E+xz9OuA/
 dnEjMan8LFngHlH/7wSDegIoObgNpAcJDNW9RpziL49YBQ+u1MmPWrCQ+EkYg+gaZEgh
 GByDQr8XVADiyyOx5Geo9xGh8+ZOmPjwJobe7aU0l5IiLZJ6rt7xc1nAeaM8elTJbdme
 r/S5hrg6evkAY8OLGMP/PaaGdCbUCoWqS6v0hgyps31cWa/20KGs33eGvv6vGCJXmZ5+
 q7ow==
X-Gm-Message-State: AG10YOQ09ZhEcLree3ezGxLlDoL6MbfnHB7PStXJv0aDHqqlRWer5mhNYwqu1zkRsJuakgt7fTFKZ3aenGsaag==
X-Received: by 10.107.12.226 with SMTP id 95mr22863538iom.70.1456020506104;
 Sat, 20 Feb 2016 18:08:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.79.90.71 with HTTP; Sat, 20 Feb 2016 18:07:56 -0800 (PST)
From: Jonathan H <pythonnut@HIDDEN>
Date: Sat, 20 Feb 2016 18:07:56 -0800
Message-ID: <CAAW2-ZeVWr_ObZ2sJnKMWRB_cCJrzNzS8xqMRiU8gyFqvA5xhw@HIDDEN>
Subject: Preliminary Patch
To: 19455 <at> debbugs.gnu.org
Content-Type: multipart/mixed; boundary=001a113f8f8e0d713a052c3e31b3
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19455
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: -0.7 (/)

--001a113f8f8e0d713a052c3e31b3
Content-Type: multipart/alternative; boundary=001a113f8f8e0d7135052c3e31b1

--001a113f8f8e0d7135052c3e31b1
Content-Type: text/plain; charset=UTF-8

Hi all!

I've produced a patch that should fix this issue. As brought up in this
Emacs.SE answer <http://emacs.stackexchange.com/a/20406/2642>, the main
challenge was distinguishing the qualifiers from subshells. To do this, I
disallowed leading octothorpes wrapped in parentheses where the parentheses
are not separated from other tokens by metacharacters. For qualifiers
(which appear after a glob), the fix is trivial. For flags (which appear
before the glob), I have to rely on the fact that flags may not contain
parentheses themselves to avoid needing more sophisticated parsing.

I've tested this against a fairly comprehensive test file, which I've also
attached.

Thanks,
Jonathan

--001a113f8f8e0d7135052c3e31b1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>Hi all!<br><br>I&#39;ve produced a patch th=
at should fix this issue. As brought up in <a href=3D"http://emacs.stackexc=
hange.com/a/20406/2642">this Emacs.SE answer</a>, the main challenge was di=
stinguishing the qualifiers from subshells. To do this, I disallowed leadin=
g octothorpes wrapped in parentheses where the parentheses are not separate=
d from other tokens by metacharacters. For qualifiers (which appear after a=
 glob), the fix is trivial. For flags (which appear before the glob), I hav=
e to rely on the fact that flags may not contain parentheses themselves to =
avoid needing more sophisticated parsing. <br><br></div>I&#39;ve tested thi=
s against a fairly comprehensive test file, which I&#39;ve also attached. <=
br><br></div>Thanks,<br></div>Jonathan<br></div>

--001a113f8f8e0d7135052c3e31b1--

--001a113f8f8e0d713a052c3e31b3
Content-Type: application/octet-stream; 
	name="0001-Highlight-zsh-glob-flags-and-qualifiers-in-sh-mode.patch"
Content-Disposition: attachment; 
	filename="0001-Highlight-zsh-glob-flags-and-qualifiers-in-sh-mode.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ikvwz84d0

RnJvbSBhNDc4ZWRlZjJiNTViMDQ5NTEyOGVhYWFkM2ExYTdiMjc3MDYyZmNhIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQeXRob25OdXQgPFB5dGhvbk51dEB1c2Vycy5ub3JlcGx5Lmdp
dGh1Yi5jb20+CkRhdGU6IFNhdCwgMjAgRmViIDIwMTYgMTc6MjE6MjYgLTA4MDAKU3ViamVjdDog
W1BBVENIXSBIaWdobGlnaHQgenNoIGdsb2IgZmxhZ3MgYW5kIHF1YWxpZmllcnMgaW4gc2gtbW9k
ZQoKKiBsaXNwL3Byb2dtb2RlL3NoLXNjcmlwdC5lbCAoc2gtc3ludGF4LXByb3BlcnRpemUtZnVu
Y3Rpb24pOgpBZGQgcmVnZXhwcyB0byBoaWdobGlnaHQgenNoIGdsb2IgZmxhZ3MgYW5kIGFsdGVy
bmF0ZSBxdWFsaWZpZXJzCndpdGhvdXQgbWlzdGFraW5nIHRoZW0gZm9yIGNvbW1lbnRzLgotLS0K
IGxpc3AvcHJvZ21vZGVzL3NoLXNjcmlwdC5lbCB8IDggKysrKysrKy0KIDEgZmlsZSBjaGFuZ2Vk
LCA3IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL3Byb2dt
b2Rlcy9zaC1zY3JpcHQuZWwgYi9saXNwL3Byb2dtb2Rlcy9zaC1zY3JpcHQuZWwKaW5kZXggN2Y4
OWFiMi4uMGMzOTJmMSAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMvc2gtc2NyaXB0LmVsCisr
KyBiL2xpc3AvcHJvZ21vZGVzL3NoLXNjcmlwdC5lbApAQCAtMTE4NCw3ICsxMTg0LDEzIEBAIHN1
YnNoZWxscyBjYW4gbmVzdC4iCiAgICAgOzsgbWV0YWNoYXJhY3RlcnMuICBUaGUgbGlzdCBvZiBz
cGVjaWFsIGNoYXJzIGlzIHRha2VuIGZyb20KICAgICA7OyB0aGUgc2luZ2xlLXVuaXggc3BlYyBv
ZiB0aGUgc2hlbGwgY29tbWFuZCBsYW5ndWFnZSAodW5kZXIKICAgICA7OyBgcXVvdGluZycpIGJ1
dCB3aXRoIGAkJyByZW1vdmVkLgotICAgICgiXFwoPzpbXnwmOzw+KClgXFxcIicgXHRcbl1cXHxc
XCR7XFwpXFwoIytcXCkiICgxICJfIikpCisgICAgKCJcXCg/OltefCY7PD4oYFxcXCInIFx0XG5d
XFx8XFwke1xcKVxcKCMrXFwpIiAoMSAiXyIpKQorICAgIDs7IEluIGFkZGl0aW9uLCBgIycgYXQg
dGhlIGJlZ2lubmluZyBvZiBjbG9zZWQgcGFyZW50aGVzZXMKKyAgICA7OyBkb2VzIG5vdCBzdGFy
dCBhIGNvbW1lbnQgaWYgdGhlIHBhcmVudGhlc2VzIGFyZSBub3QgaXNvbGF0ZWQKKyAgICA7OyBi
eSBtZXRhY2hhcmFjdGVycywgZXhjbHVkaW5nIFsoKV0uCisgICAgOzsgKGUuZy4gYGZvbygjcS8p
JyBhbmQgYCgjYilmb28nIGluIHpzaCkKKyAgICAoIltefCY7PD4oYFxcXCInIFx0XG5dKFxcKCMr
XFwpIiAoMSAiXyIpKQorICAgICgiKFxcKCNcXClbXildKz8pW158Jjs8PilgXFxcIicgXHRcbl0i
ICgxICJfIikpCiAgICAgOzsgSW4gYSAnLi4uJyB0aGUgYmFja3NsYXNoIGlzIG5vdCBlc2NhcGlu
Zy4KICAgICAoIlxcKFxcXFxcXCknIiAoMSAoc2gtZm9udC1sb2NrLWJhY2tzbGFzaC1xdW90ZSkp
KQogICAgIDs7IE1ha2Ugc3VyZSAkQCBhbmQgJD8gYXJlIGNvcnJlY3RseSByZWNvZ25pemVkIGFz
IHNleHBzLgotLSAKMi41LjAKCg==
--001a113f8f8e0d713a052c3e31b3
Content-Type: application/x-sh; name="sh_comment_tests.sh"
Content-Disposition: attachment; filename="sh_comment_tests.sh"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ikvwz85q1

IyBmb28KZWNobyAjIGZvbwooI2ZvbwogICAgICBlY2hvIGJhcikKZWNobyAkIwplY2hvICQjZm9v
CmVjaG8gJHsjZm9vfQplY2hvICJmb28gIyBiYXIiCmVjaG8gJ2ZvbyAjIGJhcicKZWNobyAke2Zv
byNiYXJ9CmVjaG8gJHtmb28jI2Jhcn0KZWNobyAqZm9vI2JhcgplY2hvICpmb28jI2JhcgplY2hv
ICgjYikqLmNqCmVjaG8gZm9vKCNxOnUpCmVjaG8gJHsoIylhfQplY2hvICR7Zm9vLyNiYXIvZm9v
fQoKIyBtb3JlIGNvbXBsZXggZXhhbXBsZXMKZWNobyBmb28vKGJhciovKSNiYXoKZWNobyBmb28v
KGJhciovKSAjIGEgY29tbWVudAooI2ZvbwogICAgKCNiYXIKICAgICAgICAoI2JhegogICAgICAg
ICAgICBlY2hvCiAgICAgICAgKSAjIGJhegogICAgKSAjIGJhcgopICMgZm9vCgojID09PT09PT09
PT09PT09PT09PT09PT09PT0KIyBTb21lIGxpbmVzIGZyb20gbXkgLnpzaHJjCiMgPT09PT09PT09
PT09PT09PT09PT09PT09PQoKIyBQbGVhc2UgZG9uJ3QgZXhwZWN0IHRoaXMgY29kZSB0byBtYWtl
IHNlbnNlLgoKW1sgJDIgIT0gKCNiKXA6KD8qKSBdXSAmJiByZXR1cm4gMQppZiBbWyAkMiA9ICgj
YikoL2hvbWUvcHdzL3BlcmZvcmNlLykoW14vXSMjKSogXV07IHRoZW4KICAgIHR5cGVzZXQgLWdh
IHJlcGx5CiAgICByZXBseT0ocDokbWF0Y2hbMl0gJCgoICR7I21hdGNoWzFdfSArICR7I21hdGNo
WzJdfSApKSApCmZpCmlmIFtbICQjY3VyX3BhdGggPT0gMSBdXTsgdGhlbgogICAgKCggJGNvbCAt
MSA+ICQjdG9rZW4gKSkgJiYgZnVsbF9wYXRoPSR7ZnVsbF9wYXRoJSUoLyMjKX0vJHRva2VuCmZp
CmRpcj0keyR7ZnVsbGRpciUlL30jIyovfQooKCAkeyNkaXIjIygjbCkoJGdsb2IpfSA8ICQjZGly
ICkpCmZ1bGxfcGF0aD0ke2Z1bGxfcGF0aCUlKC8jIyl9CmxvY2FsIC1pIGluZGV4PSQoKCQjZ2xv
YikpIGsKdGVtcF9nbG9iPSgiJHsocy8gLylnbG9iLy8oI20pPy8kTUFUQ0gqfSIpCnRlbXBfZ2xv
Yj0iKCNsKSIkeyR7KGo6LzopdGVtcF9nbG9ifS9cflwqLyRIT01FfSgvKQpkaXJzPSR7KG5PYSkk
KGZhc2QpIyNbMC05Lls6c3BhY2U6XV0jI30KaW5kZXg9JHskeyR7ZGlyc1skKCgke2RpcnNbKGkp
JDFdfSsxKSksLTFdfSUvfSMjKi99Cg==
--001a113f8f8e0d713a052c3e31b3--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19455; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 28 Dec 2014 03:04:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 27 22:04:35 2014
Received: from localhost ([127.0.0.1]:59333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y549i-0001d3-Bt
	for submit <at> debbugs.gnu.org; Sat, 27 Dec 2014 22:04:35 -0500
Received: from eggs.gnu.org ([208.118.235.92]:56976)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <pythonnut@HIDDEN>) id 1Y549f-0001ct-Vm
 for submit <at> debbugs.gnu.org; Sat, 27 Dec 2014 22:04:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pythonnut@HIDDEN>) id 1Y549e-0003pu-GJ
 for submit <at> debbugs.gnu.org; Sat, 27 Dec 2014 22:04:31 -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.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59010)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pythonnut@HIDDEN>) id 1Y549e-0003pq-Cr
 for submit <at> debbugs.gnu.org; Sat, 27 Dec 2014 22:04:30 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58666)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pythonnut@HIDDEN>) id 1Y549c-0004QD-Kn
 for bug-gnu-emacs@HIDDEN; Sat, 27 Dec 2014 22:04:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pythonnut@HIDDEN>) id 1Y549b-0003ns-1R
 for bug-gnu-emacs@HIDDEN; Sat, 27 Dec 2014 22:04:28 -0500
Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:41190)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pythonnut@HIDDEN>) id 1Y549a-0003nl-Ri
 for bug-gnu-emacs@HIDDEN; Sat, 27 Dec 2014 22:04:26 -0500
Received: by mail-qa0-f43.google.com with SMTP id n4so4991783qaq.30
 for <bug-gnu-emacs@HIDDEN>; Sat, 27 Dec 2014 19:04:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:from:date:message-id:subject:to:content-type;
 bh=7HFPyQAsuaBRR4H4G1t9V0NsyIaObvTFJgxf53/S0K4=;
 b=Z3BIP5dmnGu2A5qXi4ixq2qC0aAR1gaQFvRkNgz9UGVLrH/Rj9HxTpLDBWcZTugwpx
 zBAfLZnzQ2q8dPnEVNXnBLf4MLGrwRBKDaZmBIWF4KahwXvzpA5y5zuUx+S6lvfCI/s8
 v4Qc/+CgfWxHowIvB1ScLETbdJzsozA49FT/ET+3gfVL7DY9VeY2HSyZSIV4G2Pe6eT+
 POroAY2qQTXNBvPWNhIatEm+YcCkEUfgHznnOgDXohzrdRsv2N4iHo0zKnB+LefCsCbB
 bP2JabpzNVul6eTc45/Vg8HP5cShMVfps6dkgbjVEv/9QOqTNbBhnHG6GrrTsHBHXD2u
 ItgQ==
X-Received: by 10.140.29.138 with SMTP id b10mr43308261qgb.34.1419735866321;
 Sat, 27 Dec 2014 19:04:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.96.156.198 with HTTP; Sat, 27 Dec 2014 19:03:56 -0800 (PST)
From: Jonathan H <pythonnut@HIDDEN>
Date: Sat, 27 Dec 2014 19:03:56 -0800
Message-ID: <CAAW2-ZeD8S=FK0i1TJ8xifa+TBje6MH1ZTrvSoHfR_KTH7nweQ@HIDDEN>
Subject: 24.4; sh-mode highlighting breaks with ZSH glob modifiers
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary=001a113a75a2fccdac050b3e0304
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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: -4.0 (----)

--001a113a75a2fccdac050b3e0304
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

In ZSH globs can have optional modifiers before globs (as well as
after). Usually, the format is (#<letter here>)<glob>. The leading
pound symbol confuses sh-mode syntax highlighting, making it appear to
be a comment. As these modifiers usually appear in a conditional
expression (they are used for group capture), they also break
indentation.

I've attached a file that demonstrates this.

In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3)
 of 2014-10-21 on bitzer.hoetzel.info
Windowing system distributor `The Cygwin/X Project', version 11.0.11602000
Configured using:
 `configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib
 --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft
 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-str=
ong
 --param=3Dssp-buffer-size=3D4' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2
 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: =CE=BB

Minor modes in effect:
  ido-vertical-mode: t
  flx-ido-mode: t
  minibuffer-depth-indicate-mode: t
  magit-auto-revert-mode: t
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  helm-match-plugin-mode: t
  helm-occur-match-plugin-mode: t
  aggressive-indent-mode: t
  global-flycheck-mode: t
  flyspell-mode: t
  ido-ubiquitous-mode: t
  auto-indent-global-mode: t
  auto-indent-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  cua-mode: t
  adaptive-wrap-prefix-mode: t
  show-paren-mode: t
  rainbow-delimiters-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  linum-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  evil-leader-mode: t
  evil-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-local-mode: t
  savehist-mode: t
  global-hl-line-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <select-window> <help-echo> <select-window>
<help-echo> <select-window> <select-window> <select-window>
<help-echo> <down-mouse-1> <mouse-movement> <mouse-1>
M-x r e p o r t - e m a <return>

Recent messages:
Loading /home/pythonnut/.emacs.d/.mc-lists.el (source)...done
idle-require: require windmove
idle-require: require framemove
Loading easy-kill...done
idle-require: require flx-isearch
idle-require: require whole-line-or-region
Loading smex...done
idle-require: require psvn
idle-require finished
(No files need saving)

Load-path shadows:
~/.emacs.d/personal/ws-butler hides
/home/pythonnut/.emacs.d/elpa/ws-butler-20140816.1448/ws-butler
~/.emacs.d/personal/edmacro hides /usr/share/emacs/24.4/lisp/edmacro

Features:
(shadow sort mail-extr emacsbug sendmail ido-vertical-mode flx-ido
mb-depth psvn smex whole-line-or-region flx-isearch flx easy-kill
framemove multiple-cursors mc-hide-unmatched-lines-mode
mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more
mc-cycle-cursors mc-edit-lines multiple-cursors-core magit-filenotify
icicles icicles-mode icicles-cmd2 icicles-cmd1 icicles-mcmd icicles-fn
icicles-var icicles-opt cus-theme cus-edit wid-edit hexrgb icicles-face
helm-ag helm-semantic helm-imenu imenu semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet
helm-projectile helm-config async-bytecomp async helm-aliases
magit-key-mode magit view epa derived epg diff-git diff-mode autorevert
filenotify git-rebase-mode git-commit-mode server log-edit message idna
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log projectile ibuf-ext ibuffer pkg-info lisp-mnt epl f s
ucs-normalize helm-ring helm-elisp helm-eval eldoc helm-files
image-dired tramp tramp-compat tramp-loaddefs trampver shell dired-x
dired-aux ffap helm-buffers helm-elscreen helm-tags helm-bookmark
helm-adaptive helm-info helm-net browse-url xml url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source gnus-util mm-util mail-prsvr
password-cache url-vars mailcap bookmark pp helm-locate helm-help
helm-org org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs format-spec cal-menu
calendar cal-loaddefs helm-match-plugin helm-grep helm-regexp
helm-plugin grep helm-external helm-utils ls-lisp dired helm helm-source
eieio eieio-core idle-require flymake compile comint ansi-color
aggressive-indent easy-mmode names edebug flycheck find-func help-mode
rx pcase subr-x flyspell ispell load-dir config-solarized
solarized-dark-theme solarized config-intel config-minibuffer
config-icicles config-helm config-ido ido-ubiquitous warnings
auto-indent-mode auto-complete-config auto-complete popup ido config-vcs
config-auto-complete config-paste cua-base config-whitespace
adaptive-wrap config-indent config-ui paren config-rainbow-delimiters
rainbow-delimiters config-smartparens smartparens-config smartparens
dash config-undo diminish config-ace-easymotion evil-easymotion noflet
cl-indent cl-macs ace-jump-mode cl gv config-line-numbers linum-relative
linum config-scroll config-evil config-evil-textobjects
config-evil-modules evil-surround evil-leader evil evil-integration
undo-tree diff evil-maps evil-commands evil-command-window evil-types
evil-search evil-ex evil-macros evil-repeat evil-states evil-core
evil-common windmove thingatpt rect evil-digraphs evil-vars ring
config-safety config-desktop savehist config-modes key-chord hl-line
config-package finder-inf edmacro kmacro cl-loaddefs cl-lib info
easymenu package epg-config config-setq delsel cus-start cus-load
byte-opt bytecomp byte-compile cconv advice help-fns 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 782052 178836)
  (symbols 48 58485 0)
  (miscs 40 120 268)
  (strings 32 135655 141330)
  (string-bytes 1 4259469)
  (vectors 16 110096)
  (vector-slots 8 2260594 96673)
  (floats 8 10670 428)
  (intervals 56 550 248)
  (buffers 960 12)
  (heap 1024 63413 7100))

--001a113a75a2fccdac050b3e0304
Content-Type: text/plain; charset=US-ASCII; name="zsh_testcase.zsh.txt"
Content-Disposition: attachment; filename="zsh_testcase.zsh.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i47u0jca0

Zm9yIGkgaW4gJHJlZ2lvbl9oaWdobGlnaHQ7IGRvDQogIGlmIFtbICRwYXJhbSA9PSAoI2IpW14w
LTldIyMoPC0+KVteMC05XSMjKDwtPikoKikgXV07IHRoZW4NCiAgICBpPSgiJG1hdGNoIikNCiAg
ICBpZiBbWyAkaVszXSA9PSAqYmxhY2sqIF1dICYmICgoJGlbMl0gLSAkaVsxXSA+IDAgJiYgJGlb
MV0gPiAxKSk7IHRoZW4NCiAgICAgIEJVRkZFUj0kQlVGRkVSWzEsJGlbMV1dJEJVRkZFUlskaVsy
XSwkKCgkI0JVRkZFUiAtIDEpKV0NCiAgICBmaQ0KICBmaQ0KZW5kDQo=
--001a113a75a2fccdac050b3e0304--




Acknowledgement sent to Jonathan H <pythonnut@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#19455; 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: Sun, 14 Aug 2016 04:30:02 UTC

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