all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug in shell script mode
@ 2007-04-12  9:37 A Soare
  2007-04-12 13:34 ` Roberto Rodríguez
  0 siblings, 1 reply; 2+ messages in thread
From: A Soare @ 2007-04-12  9:37 UTC (permalink / raw)
  To: Emacs   Bug  [bug-gnu-emacs]

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug in shell script mode
  2007-04-12  9:37 Bug in shell script mode A Soare
@ 2007-04-12 13:34 ` Roberto Rodríguez
  0 siblings, 0 replies; 2+ messages in thread
From: Roberto Rodríguez @ 2007-04-12 13:34 UTC (permalink / raw)
  Cc: Emacs Bug [bug-gnu-emacs]


[-- Attachment #1.1: Type: text/plain, Size: 431 bytes --]

2007/4/12, A Soare <alinsoar@voila.fr>:
>
> 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.


That is already fixed in Emacs 22.

-- 
Roberto Rodríguez
http://free-shell.eu/~rarsaqi/

[-- Attachment #1.2: Type: text/html, Size: 813 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-12 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12  9:37 Bug in shell script mode A Soare
2007-04-12 13:34 ` Roberto Rodríguez

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.