GNU bug report logs - #57182
28.1; Bad coloring in bash arithmetic substitition

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: peter.t.kozich@HIDDEN; merged with #13241; dated Sat, 13 Aug 2022 16:57:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 13241 57182. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 57182) by debbugs.gnu.org; 15 Aug 2022 07:39:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 15 03:39:59 2022
Received: from localhost ([127.0.0.1]:40669 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oNUhb-0002Dt-8I
	for submit <at> debbugs.gnu.org; Mon, 15 Aug 2022 03:39:59 -0400
Received: from quimby.gnus.org ([95.216.78.240]:56530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oNUhM-0002DD-An
 for 57182 <at> debbugs.gnu.org; Mon, 15 Aug 2022 03:39:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=2zoQHmz4ceJNG/fYFdPWQ64sxdPZOKugIn6Q7ogU/TM=; b=BxP1EoUlgycx9vVkqKMlU1f6tD
 ISsZ6d2NgiOhHexSCthujh3rhyx1UZzk3YlkwAVN6HeGBO8hVawngZRRixUAXOUiRtNNB3OLFCnEl
 6j7ZtitvYkq25K138WCDioj50/3y6MgpaH+BO7iSxMV4kRISwDcXhtXquwz+Oq1LWqo8=;
Received: from [84.212.220.105] (helo=joga)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oNUhE-0004zH-Ja; Mon, 15 Aug 2022 09:39:38 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: "Peter Kozich (GM)" <peter.t.kozich@HIDDEN>
Subject: Re: bug#57182: 28.1; Bad coloring in bash arithmetic substitition
In-Reply-To: <1cea3e8bfd281804f042df45519045f7eb6ddc66.camel@HIDDEN> (Peter
 Kozich's message of "Sat, 13 Aug 2022 15:22:59 +0200")
References: <1cea3e8bfd281804f042df45519045f7eb6ddc66.camel@HIDDEN>
X-Now-Playing: Aksak Maboul's _Un Peu De L'Ame Des Bandits_: "Bosses de
 Crosses"
Date: Mon, 15 Aug 2022 09:39:36 +0200
Message-ID: <87mtc69cqv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: "Peter Kozich (GM)" <peter.t.kozich@HIDDEN> writes: > In
 Shell-script mode,
 the second opening parenthesis in $((var+1)) has > a different
 color than the first one (i.e. it is colored as the > expression within).
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 57182
Cc: 57182 <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: -3.3 (---)

"Peter Kozich (GM)" <peter.t.kozich@HIDDEN> writes:

> In Shell-script mode, the second opening parenthesis in $((var+1)) has
> a different color than the first one (i.e. it is colored as the
> expression within).

Yup.  This was also noted in bug#13241 from a different point of view,
so I'm merging the two bug reports.





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

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


Received: (at submit) by debbugs.gnu.org; 13 Aug 2022 16:56:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 13 12:56:57 2022
Received: from localhost ([127.0.0.1]:34977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oMuRU-0006LW-KX
	for submit <at> debbugs.gnu.org; Sat, 13 Aug 2022 12:56:57 -0400
Received: from lists.gnu.org ([209.51.188.17]:57588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <peter.t.kozich@HIDDEN>) id 1oMr6a-0006Ve-Lx
 for submit <at> debbugs.gnu.org; Sat, 13 Aug 2022 09:23:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33448)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <peter.t.kozich@HIDDEN>)
 id 1oMr6a-0007D3-H5
 for bug-gnu-emacs@HIDDEN; Sat, 13 Aug 2022 09:23:08 -0400
Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:56204)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <peter.t.kozich@HIDDEN>)
 id 1oMr6W-00049B-MJ
 for bug-gnu-emacs@HIDDEN; Sat, 13 Aug 2022 09:23:08 -0400
Received: by mail-wm1-x32f.google.com with SMTP id b6so1743404wmq.5
 for <bug-gnu-emacs@HIDDEN>; Sat, 13 Aug 2022 06:23:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:content-transfer-encoding:date:to:reply-to
 :from:subject:message-id:sender:from:to:cc;
 bh=hJCg4J1jB3CCZtMCu5YzgiLbV8oTqwdAGq3JtitlaBA=;
 b=WZRvp7SvdkeHPK1x1B9wtpVV4EkgPTfjQEmsjQKJPyRleem2XObXJCnnkBWyV3qLX1
 JNwNQHyhkgxECKPOzqa39SS7g6E3IMau0jYU0SaautpGJSVXZys01Y3gf5+oZhkjmJD8
 JrwqEc1eAJcqTCB9hmTQVcvLNinEeF9sXpR5kFMH86yncCvQKGuIhcB3sk0ADujn4F7a
 gabZ0B3y9xGmiLe+WcPSfrkWKRRWbBHdQeSoc+uxFLn0s3JG4qKRA8v89I2YZGtlrFuG
 lgpXigZe7997I4jvImZDiEDeYGiMN5tgUgUrKha9cZXuJ4tULlmwGcPXW8eNMHbH2HAk
 FyVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:content-transfer-encoding:date:to:reply-to
 :from:subject:message-id:sender:x-gm-message-state:from:to:cc;
 bh=hJCg4J1jB3CCZtMCu5YzgiLbV8oTqwdAGq3JtitlaBA=;
 b=cVZP3vq4/Kvey7dAucevprB8qqlbQ8nwaPhMR1BlMY3o+d9aVxfXLIB6sUCsesYqHt
 7YOdUxXkZXHPOIcpjWWuhFgVYeOW/fh9RsAqUbf3yqzvJbBX4cwgdp2ZRo3xq9SIK5Be
 QD4GrDLMA3fdJW5oE+DhjPftu1VUPnrntXQort6aNyoHh1YHVHPjDzIzCRcA++8HOrB0
 fqmFAz/WognyaU4azpFVFaPi9JKrmxbMYaGw/ggXHo1/T7qhfGaoW+XHOYS4tTN+9j8Y
 vrDxV+Ha7OpWoNAnbg/DPBAaeE8gkYuUYRdmQfXCVzQtiO3pDuD4cKb3BEqK5MvBF9Z1
 m/Jw==
X-Gm-Message-State: ACgBeo0hclqFRIGDYvmVJeTOiqSboTIafoIhRbKzqy5yvC9+llZ4Y4YN
 aIkKL7gj2D7On0zrAorMJ8jndqtcePE=
X-Google-Smtp-Source: AA6agR59bvYrPwomDH+iWGITFdw2MkFTbYdgz/Cn70uTyhIvUmLdLqgl3EEN5Yp81RC+M+K6Qw3HTg==
X-Received: by 2002:a05:600c:34c6:b0:3a3:2549:1905 with SMTP id
 d6-20020a05600c34c600b003a325491905mr5301427wmq.204.1660396981307; 
 Sat, 13 Aug 2022 06:23:01 -0700 (PDT)
Received: from [192.168.0.21] (catv-178-48-101-23.catv.fixed.vodafone.hu.
 [178.48.101.23]) by smtp.gmail.com with ESMTPSA id
 q8-20020a05600c2e4800b003a3561d4f3fsm2761071wmf.43.2022.08.13.06.23.00
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 13 Aug 2022 06:23:00 -0700 (PDT)
Message-ID: <1cea3e8bfd281804f042df45519045f7eb6ddc66.camel@HIDDEN>
Subject: 28.1; Bad coloring in bash arithmetic substitition
From: "Peter Kozich (GM)" <peter.t.kozich@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Date: Sat, 13 Aug 2022 15:22:59 +0200
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) 
MIME-Version: 1.0
Received-SPF: pass client-ip=2a00:1450:4864:20::32f;
 envelope-from=peter.t.kozich@HIDDEN; helo=mail-wm1-x32f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 13 Aug 2022 12:56:55 -0400
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>
Reply-To: peter.t.kozich@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


In Shell-script mode, the second opening parenthesis in $((var+1)) has
a different color than the first one (i.e. it is colored as the
expression within).

Not a big deal, if the expression is as simple as above, but if the
expression itself contains parentheses, then the bad coloring gets
distracting, because the color of the expression may switch off in its
middle due to a closing paranthesis within the expression.

It is clear that the coloring in emacs 28 is intended for the command
string in command substitution, but unfortunately it is triggered by
$(( as well.



In GNU Emacs 28.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.34, cairo version 1.17.6)
 of 2022-07-15 built on buildhw-x86-02.iad2.fedoraproject.org
Windowing system distributor 'The X.Org Foundation', version
11.0.12014000
System Description: Fedora Linux 36 (Thirty Six)

Configured using:
 'configure --build=3Dx86_64-redhat-linux-gnu
 --host=3Dx86_64-redhat-linux-gnu --program-prefix=3D
 --disable-dependency-tracking --prefix=3D/usr --exec-prefix=3D/usr
 --bindir=3D/usr/bin --sbindir=3D/usr/sbin --sysconfdir=3D/etc
 --datadir=3D/usr/share --includedir=3D/usr/include --libdir=3D/usr/lib64
 --libexecdir=3D/usr/libexec --localstatedir=3D/var
 --sharedstatedir=3D/var/lib --mandir=3D/usr/share/man
 --infodir=3D/usr/share/info --with-dbus --with-gif --with-jpeg --with-
png
 --with-rsvg --with-tiff --with-xpm --with-x-toolkit=3Dgtk3 --with-gpm=3Dno
 --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-
json
 --with-native-compilation build_alias=3Dx86_64-redhat-linux-gnu
 host_alias=3Dx86_64-redhat-linux-gnu CC=3Dgcc 'CFLAGS=3D-DMAIL_USE_LOCKF -=
O2
 -flto=3Dauto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-
strong
 -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=3D-Wl,-z,relro
 PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C.UTF-8
  value of $LC_CTYPE: C.UTF-8
  value of $LC_MESSAGES: C.UTF-8
  value of $LC_MONETARY: C.UTF-8
  value of $LC_NUMERIC: C.UTF-8
  value of $LC_TIME: Monday.UTF-8
  value of $LANG: C.utf8
  locale-coding-system: utf-8-unix

Major mode: Shell-script

Minor modes in effect:
  highlight-indent-guides-mode: t
  recentf-mode: t
  global-hl-line-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  horizontal-scroll-bar-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

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch
goto-addr thingatpt noutline outline easy-mmode view mule-util jka-
compr
info time-date sh-script smie executable mic-paren
highlight-indent-guides advice color recentf tree-widget wid-edit
xcscope ring cc-styles cc-align cc-engine cc-vars cc-defs dracula-theme
hl-line cus-load tabbar finder-inf package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer 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 emoji-zwj
charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 167426 12278)
 (symbols 48 12666 0)
 (strings 32 43489 2174)
 (string-bytes 1 1370694)
 (vectors 16 22737)
 (vector-slots 8 458372 21876)
 (floats 8 125 135)
 (intervals 56 1092 0)
 (buffers 992 12))





Acknowledgement sent to peter.t.kozich@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#57182; 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: Mon, 15 Aug 2022 07:45:01 UTC

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