From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rui Tiago Matos Newsgroups: gmane.emacs.help Subject: End of file during parsing? Date: Sun, 10 Apr 2005 21:12:58 +0100 Message-ID: Reply-To: Rui Tiago Matos NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1113164206 17374 80.91.229.2 (10 Apr 2005 20:16:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Apr 2005 20:16:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 10 22:16:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DKir9-00016s-Tr for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Apr 2005 22:16:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKiR8-0007Ix-2R for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Apr 2005 15:49:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DKiQe-0007HR-Cl for help-gnu-emacs@gnu.org; Sun, 10 Apr 2005 15:49:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DKiQa-0007G2-EY for help-gnu-emacs@gnu.org; Sun, 10 Apr 2005 15:49:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKiQZ-0007DF-Rx for help-gnu-emacs@gnu.org; Sun, 10 Apr 2005 15:49:03 -0400 Original-Received: from [64.233.184.198] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DKip9-0007y9-41 for help-gnu-emacs@gnu.org; Sun, 10 Apr 2005 16:14:27 -0400 Original-Received: by wproxy.gmail.com with SMTP id 50so1569061wri for ; Sun, 10 Apr 2005 13:13:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=P+vn6kNw0NKAJv8AOx75LpuO/OM/8wEC7b6KjCDkmBQHjv/+NtvUBQpRwYsR/s9gUAUvMJAlx0YAdrsuM04RKjoq8i97zmOXU7D6515jiKwZCVNYIeug+aWQyspuJhr+hoJ0wCS7PkxF0le/2/jurj1Nzplje52j0hsZeq+gzms= Original-Received: by 10.54.71.15 with SMTP id t15mr2875511wra; Sun, 10 Apr 2005 13:12:59 -0700 (PDT) Original-Received: by 10.54.102.9 with HTTP; Sun, 10 Apr 2005 13:12:58 -0700 (PDT) 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:25535 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25535 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? [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 }