In article <[EMAIL PROTECTED]>, Rui Tiago Matos <[EMAIL PROTECTED]> wrote:
> I hacked up a bash function [1] to open some files in different > frames. It works great after emacs is running. Otherwise it doesn't: > it opens up emacs but I get: > > command-line-1: End of file during parsing > > Now, this is very strange because if I use --eval=... from the command > line directly it works as expected. Anyone has an idea about why this > doesn't work? Try changing the command line that invokes emacs in that case to: emacs21 "$CMDLINE" The problem is that the shell is splitting the arguments at the spaces when you don't quote it. So the argument that emacs is seeing is: --eval=(find-file-other frame > > [1] > emacs () > { > if [ -z "$DISPLAY" ]; then > emacs21 $@; > else > if [ ! "`/bin/ps -U $UID | grep emacs`" ]; then > local CMDLINE="--eval="; > 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" != "--eval=" ]; then > emacs21 $CMDLINE & > 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 > } -- Barry Margolin, [EMAIL PROTECTED] Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs