GNU bug report logs - #5140
shell mode color coding for bash

Previous Next

Package: emacs;

Reported by: meingbg <meingbg <at> gmail.com>

Date: Mon, 7 Dec 2009 08:25:04 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5140 in the body.
You can then email your comments to 5140 AT debbugs.gnu.org in the normal way.

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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#5140; Package emacs. (Mon, 07 Dec 2009 08:25:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to meingbg <meingbg <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 07 Dec 2009 08:25:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: meingbg <meingbg <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: shell mode color coding for bash
Date: Mon, 7 Dec 2009 09:17:25 +0100
[Message part 1 (text/plain, inline)]
When editing a bash script with nested " and ` marks the color coding gets
confused, coloring most text as a string. Sample code to reproduce the color
coding follows (this code is debugged and runs as expected, so syntax should
be ok)


#!/bin/bash

function list-dir {
cat "$repo"/list
}

function init-repo {
mkdir -p "$repo"
touch "$repo"/list
}

function save-dir {
init-repo
dirname="`basename "$1"`"
dirhash="`dir-to-repo "$1"`"
saveline="$dirhash $dirname"
if [ "`grep -Fc "$saveline" "$repo"/list`" -gt "0" ]; then
echo "A directory with the same name and content is already in the
repository."
exit
else
echo "$saveline" >> "$repo"/list
fi
}









In GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-05-02 on king, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.70000000
configured using `configure  '--build=x86_64-linux-gnu'
'--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.1/leim'
'--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g
-Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Shell-script

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-k C-k C-k <C-home> C-s f i l e - n a m e <backspace>
<right> <C-backspace> <C-backspace> b a s e n a m e
C-s C-s <right> <C-backspace> <C-backspace> b a s e
n a m e C-s C-s <right> <C-backspace> <C-backspace>
b a s e n a m e C-s C-s <right> <C-backspace> <C-backspace>
b a s e n a m e C-s C-s <C-home> C-s C-s C-s <C-home>
C-s C-g C-g C-s b a s C-g C-g <help-echo> <help-echo>
<help-echo> <C-home> C-s b a s e C-s C-s C-s C-s <down>
<C-home> <C-end> <up> <C-end> <C-end> <right> <right>
<backspace> <C-end> <C-end> <return> C-x C-s <down>
<down> <up> <up> <down> <down> <down> <down> <down>
<down> <up> <C-home> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <down-mouse-1>
<mouse-movement> <mouse-movement> <drag-mouse-1> C-w
C-k C-x C-s <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <up> <up> <up>
<up> <up> <help-echo> <help-echo> <help-echo> <help-echo>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<up> <up> M-x r e p o r t - e m a <tab> <return>

Recent messages:
Quit [4 times]
Mark set
Mark saved where search started
Mark set [4 times]
call-interactively: End of buffer [2 times]
Mark set [2 times]
Wrote /sr/path/store
Mark set
Wrote /sr/path/store
Loading emacsbug...done
[Message part 2 (text/html, inline)]

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 07 Dec 2009 15:25:08 GMT) Full text and rfc822 format available.

Notification sent to meingbg <meingbg <at> gmail.com>:
bug acknowledged by developer. (Mon, 07 Dec 2009 15:25:08 GMT) Full text and rfc822 format available.

Message #10 received at 5140-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: meingbg <meingbg <at> gmail.com>
Subject: Re: bug#5140: shell mode color coding for bash
Date: Mon, 07 Dec 2009 10:20:43 -0500
> When editing a bash script with nested " and ` marks the color coding gets
> confused, coloring most text as a string. Sample code to reproduce the color
> coding follows (this code is debugged and runs as expected, so syntax should
> be ok)

You may want to upgrade to Emacs-23 where this has been fixed,


        Stefan



bug archived. Request was from Debbugs Internal Request <bug-gnu-emacs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Jan 2010 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 170 days ago.

Previous Next


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