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: Re: End of file during parsing? Date: Mon, 11 Apr 2005 22:59:25 +0100 Message-ID: References: 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 1113256820 19521 80.91.229.2 (11 Apr 2005 22:00:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2005 22:00:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 12 00:00:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DL6wK-0008Bi-7B for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Apr 2005 23:59:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DL6WV-0006OX-UG for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Apr 2005 17:32:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DL6UC-0005dX-7w for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 17:30:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DL6U5-0005aC-Hv for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 17:30:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DL6U5-0005Zi-9v for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 17:30:17 -0400 Original-Received: from [64.233.184.192] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DL6wJ-0003id-Dg for help-gnu-emacs@gnu.org; Mon, 11 Apr 2005 17:59:27 -0400 Original-Received: by wproxy.gmail.com with SMTP id 50so2002515wri for ; Mon, 11 Apr 2005 14:59:25 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ZTUANmKl+hvYFqd9d+6hHqYyBPXdTINp5VP9YkHKEOkZVmZDe2UaZX7UwpVOjM/Bvpgd7RBkxvK048/PkwcZPTAFizVzndUo7+BVWTPxtjQvqADH6vSkDC5JJNIfrSkXfi07H22ZXA9AYwYUhFx3Y8ZIUayGbyqvMUx5wdyDOHg= Original-Received: by 10.54.16.39 with SMTP id 39mr840432wrp; Mon, 11 Apr 2005 14:59:25 -0700 (PDT) Original-Received: by 10.54.102.9 with HTTP; Mon, 11 Apr 2005 14:59:25 -0700 (PDT) Original-To: help-gnu-emacs@gnu.org In-Reply-To: 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:25585 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25585 On Apr 11, 2005 4:39 AM, Barry Margolin 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 }