From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: End of file during parsing? Date: Sun, 10 Apr 2005 23:39:53 -0400 Organization: Symantec Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1113190938 940 80.91.229.2 (11 Apr 2005 03:42:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2005 03:42:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 11 05:42:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DKpoT-0002Ql-JD for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Apr 2005 05:42:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKpOV-00082L-KA for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Apr 2005 23:15:23 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 10 Apr 2005 22:39:53 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) X-Copies-To: never Original-Lines: 67 Original-NNTP-Posting-Host: 24.128.234.87 Original-X-Trace: sv3-rz6W4QtZxbRXZpURVujEmjZfd99lUh29KmROSnoqq7IU+T4mFKMqri/KWw9ltMpJFZ9CjZ+qYre0ad/!4XcD25bFZrupIa4NMvuJWWbb+vtYfD0FHjhVS610yqsBgZza+VcG43gQrxeROv8J650A+HaxUWsa!Nl+hpVxfhwA= Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Original-Xref: shelby.stanford.edu gnu.emacs.help:129980 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25543 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25543 In article , Rui Tiago Matos 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, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***