From: A Soare <alinsoar@voila.fr>
To: "Emacs Bug [bug-gnu-emacs]" <bug-gnu-emacs@gnu.org>
Subject: Bug in shell script mode
Date: Thu, 12 Apr 2007 11:37:14 +0200 (CEST) [thread overview]
Message-ID: <12504688.153861176370634852.JavaMail.www@wwinf4203> (raw)
readlink()
{
OLDPWD="`/bin/pwd`"
lfile="$1"
while [ -h "$lfile" -a -f "$lfile" ]; do
CWD="`dirname "$lfile"`"
if [ "`expr "${CWD}" : "\.\."`" = "2" ]; then
CWD="`/bin/pwd`/$CWD"
fi
lfile="`basename "$lfile"`"
cd "$CWD"
lfile="`/bin/ls -l "$lfile"|sed 's/^.*-> *\(.*\) *$/\1/'`"
done
if [ -f "$lfile" ]; then
CWD="`dirname "$lfile"`"
lfile="`basename "$lfile"`"
if [ "`expr "${CWD}" : "\.\."`" = "2" ]; then
CWD="`/bin/pwd`/$CWD"
fi
cd "$CWD"
echo `/bin/pwd`/$lfile
cd "$OLDPWD"
return 0
fi
cd "$OLDPWD"
return 1
}
Copy and paste this text into a buffer with shell-script [sh] mode.
After this line
if [ "`expr "${CWD}" : "\.\."`" = "2" ]; then
all text seems a string, even it is correct. More, if we try to select it with double click on the left [, we obtain the message
forward-sexp: Scan error: "Unbalanced parentheses", 10177, 22308.
next reply other threads:[~2007-04-12 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 9:37 A Soare [this message]
2007-04-12 13:34 ` Bug in shell script mode Roberto Rodríguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12504688.153861176370634852.JavaMail.www@wwinf4203 \
--to=alinsoar@voila.fr \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.