help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: End of file during parsing?


From: Rui Tiago Matos
Subject: Re: End of file during parsing?
Date: Mon, 11 Apr 2005 22:59:25 +0100

On Apr 11, 2005 4:39 AM, Barry Margolin <barmar@alum.mit.edu> wrote:
> Try changing the command line that invokes emacs in that case to:
> 
> emacs21 "$CMDLINE"

Indeed that works, thanks!

Yet it only solved only part of the problem as I still continued to
have some problems but finally I've come to a solution and I can
finally edit multiple files smoothly :-) FWIW here is the final
version:

emacs () 
{ 
    if [ -z "$DISPLAY" ]; then
        emacs21 "$@";
    else
        if [ ! "`/bin/ps -U $UID | grep emacs`" ]; then
            local CMDLINE="--eval=(defun myfun () ";
            local FILE;
            for FILE in $*;
            do
                if ( grep ^/ <<< $FILE ) || ( grep ^~ <<< $FILE ); then
                    CMDLINE="$CMDLINE(find-file-other-frame \"$FILE\")";
                else
                    CMDLINE="$CMDLINE(find-file-other-frame \"$PWD/$FILE\")";
                fi;
            done;
            if [ $# != 0 ]; then
                emacs21 "$CMDLINE"")" -f myfun &
            else
                emacs21 &
            fi;
        else
            local CMDLINE="-q";
            local FILE;
            for FILE in $*;
            do
                if ( grep ^/ <<< $FILE ) || ( grep ^~ <<< $FILE ); then
                    CMDLINE="$CMDLINE (find-file-other-frame \"$FILE\")";
                else
                    CMDLINE="$CMDLINE (find-file-other-frame \"$PWD/$FILE\")";
                fi;
            done;
            if [ "$CMDLINE" != "-q" ]; then
                gnudoit $CMDLINE;
            fi;
        fi;
    fi
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]