From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: How to get "emacsclient --eval x" to DWIM when Emacs is not started Date: Sun, 30 Mar 2008 22:21:35 +0200 Message-ID: <47EFF64F.7080408@gmail.com> References: <7dbe73ed0803301309t3de07534w9b86159192214e07@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206908522 13848 80.91.229.12 (30 Mar 2008 20:22:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Mar 2008 20:22:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mathias Dahl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 30 22:22:33 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jg42t-0001T4-Qq for ged-emacs-devel@m.gmane.org; Sun, 30 Mar 2008 22:22:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jg42H-0002uQ-QG for ged-emacs-devel@m.gmane.org; Sun, 30 Mar 2008 16:21:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jg42D-0002u3-7k for emacs-devel@gnu.org; Sun, 30 Mar 2008 16:21:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jg429-0002tf-Mt for emacs-devel@gnu.org; Sun, 30 Mar 2008 16:21:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jg429-0002tc-K5 for emacs-devel@gnu.org; Sun, 30 Mar 2008 16:21:41 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jg429-0002RF-AU for emacs-devel@gnu.org; Sun, 30 Mar 2008 16:21:41 -0400 Original-Received: from c83-254-150-27.bredband.comhem.se ([83.254.150.27]:60809 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Jg427-00079C-5F; Sun, 30 Mar 2008 22:21:39 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <7dbe73ed0803301309t3de07534w9b86159192214e07@mail.gmail.com> X-Antivirus: avast! (VPS 080330-0, 2008-03-30), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.150.27 X-Scan-Result: No virus found in message 1Jg427-00079C-5F. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Jg427-00079C-5F 27a3f469f2c8b06c12f1d56c76ee66b6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93942 Archived-At: Mathias Dahl wrote: > How can I get "emacsclient --eval x" to DWIM when Emacs is not > started? I have tried the following: > > emacsclient -e '(message "Hello!")' -a emacs > > But that does not work. What happens is that Emacs, when started as > the alternate editor, tries to open a file with the name ''(message > "Hello!"). > > For normal operation, i.e. not using --eval but just for opening a > file, -a emacs works well and does what I expect. Why does not --eval > do the same? I have, of course, (server-start) in my .emacs file. > > As far as I can see, the manual does not mention this case. You can always try the patches I use for w32. It works fine for cases like the above though you just write something like emacsclient -e "(message \"hello\")"