From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: problem with find-file in --eval from command line Date: Wed, 24 Aug 2011 19:54:21 +0200 Message-ID: <877h62wv8y.fsf@Rainer.invalid> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwHev-0001WX-SX for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 13:54:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwHeu-0002am-F6 for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 13:54:37 -0400 Received: from lo.gmane.org ([80.91.229.12]:57120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwHeu-0002ac-8s for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 13:54:36 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QwHes-0005DC-Mr for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 19:54:34 +0200 Received: from p57aada45.dip.t-dialin.net ([87.170.218.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Aug 2011 19:54:34 +0200 Received: from Stromeko by p57aada45.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Aug 2011 19:54:34 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Herbert Sitz writes: > In Linux I'm not sure how to do the quoting. I tried this: > > ---> emacs --eval "( find-file "/home/somefile.org" )" Provided you don't use any completely exotic shell, that is what Emacs gets to see: ( find-file /home/somefile.org ) > And I get the error: > > Symbols' value as variable is void: /home/somefile\.org > > It seems there's some problem with the period in the filename, but maybe it's > more than that. Can anyone explain how to properly quote the Linux commandline > version? (File comes up fine if I just do find-file in a running emacs.) A safe way to quote this particular invocation: emacs --eval '( find-file "/home/somefile.org" )' This only works in tcsh emacs --eval "( find-file \\"/home/somefile.org\\" ) " Bash needs this instead emacs --eval "( find-file "'"'"/home/somefile.org"'"'" ) " THere may be other solutions for bash, but I never really got the hang of their quoting rules. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada