From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Gardella Newsgroups: gmane.emacs.help Subject: Re: Calling emacsclient Date: Wed, 14 Nov 2012 12:22:08 -0500 Organization: Aioe.org NNTP Server Message-ID: <878va4nlq7.fsf@gmail.com> References: <87ip9b9zvj.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352913918 10835 80.91.229.3 (14 Nov 2012 17:25:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2012 17:25:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 14 18:25:29 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TYgiN-0002Nw-Co for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 18:25:27 +0100 Original-Received: from localhost ([::1]:40956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYgiD-0001Cs-JN for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 12:25:17 -0500 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: ays4xj3A5hLoCGicy3LHqQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:V9DIhS6GqAg9n0b78k0yHQ3RIw8= Original-Xref: usenet.stanford.edu gnu.emacs.help:195366 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87690 Archived-At: Hi again, I had some further notes/thoughts for clarification. Thorsten Jolitz writes: > I have another problem not yet solved - I want to call an Emacsclient > with a file to open and some code to evaluate. Using the "-c" and > "--eval" options in one call gives an error for me, and this seems to be > in accordance with the manual that says its either the one or the other. > > However, if I try two sequential calls instead, it works somehow, but > not as intended. These two calls directly after another > > ,-------------------------- > | (call 'emacsclient > | "-c" "my/dir/my-file") > `-------------------------- > > ,--------------------------- > | (call 'emacsclient > | "--eval" > | "(message \"CALL 1\")") > `--------------------------- > > open a new emacs-frame showing a 'my-file' buffer, but in the *Messages* > buffer there is no CALL 1 message. But when I kill the Emacsclient-frame > with C-x C-c, CALL 1 is shown as return value in the calling external > program and now appears in the *Messages* buffer too. It seems the > second call is waiting for the first call to terminate. This is actually expected behavior, by the way. In an interactive emacs environment such as an emacsclient frame, `standard-output' is the *Messages* buffer. In a batch arrangement, such as emacsclient --eval, `standard-output' is the calling shell or program's standard output. So I'm guessing that your second call actually completes normally, but you don't see it until you close the frame. There is a syntax for using --eval inside an existing interactive emacsclient frame. One cannot combine -t and -e. Try emacsclient -te '(message "boop") and check your *Messages* buffer. What is the Lisp-like program composing these calls, by the way? Is this scsh or something? -WGG -- I use grml (http://grml.org/)