From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: emacsclient - load file and recieve output Date: Sat, 13 Jul 2013 11:53:41 +0200 Message-ID: <87li5ayee2.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373709252 7077 80.91.229.3 (13 Jul 2013 09:54:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Jul 2013 09:54:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 13 11:54:12 2013 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 1UxwWn-0002gR-Sm for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Jul 2013 11:54:10 +0200 Original-Received: from localhost ([::1]:34983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxwWn-0002ox-K4 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Jul 2013 05:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxwWc-0002oe-Tl for help-gnu-emacs@gnu.org; Sat, 13 Jul 2013 05:53:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxwWa-0003kl-P3 for help-gnu-emacs@gnu.org; Sat, 13 Jul 2013 05:53:58 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:41785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxwWa-0003ka-JD for help-gnu-emacs@gnu.org; Sat, 13 Jul 2013 05:53:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UxwWY-0002WC-U1 for help-gnu-emacs@gnu.org; Sat, 13 Jul 2013 11:53:54 +0200 Original-Received: from e178054149.adsl.alicedsl.de ([85.178.54.149]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Jul 2013 11:53:54 +0200 Original-Received: from tjolitz by e178054149.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Jul 2013 11:53:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178054149.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:/AXsKgSTtgnbCTRmTq8JOqt2Ong= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:92101 Archived-At: Hi List, say I start emacs as server ,------------------------------------------------------ | $ emacs -Q --daemon=my-server --directory=/home/DIR `------------------------------------------------------ and calls from the command-line work so far ,--------------------------------------------------------- | $ emacsclient -s my-server -e "(+ 3 5)" | 8 | $ emacsclient -s my-server -e "(message \"%s\" (+ 3 5))" | "8" | $ emacsclient -s my-server -e "(format \"%s\" (+ 3 5))" | "8" | $ emacsclient -s my-server -e "(print \"hallo world\")" | "hallo world" `--------------------------------------------------------- Now I want to load a file (in /home/DIR/) with Emacs Lisp code and receive the output from that code. ,------------------------------------------------------------------------ | $ emacsclient -s my-server -e "(load-file \"testfile.el\")" | t `------------------------------------------------------------------------ The file contains the same expressions as above ,----------------------- | (+ 3 5) | | (message "%s" (+ 3 5)) | | (format "%s" (+ 3 5)) | | (print "hallo world") `----------------------- and loading it from withing Emacs with 'M-: (load-file ...)' prints the 'message and 'print output into the *Messages* buffer as expected. But with the call to emacsclient, (it seems) I only receive the final 't' (=> load-file was successful). How can I load a file within a call to emacsclient and receive all the output that goes to stdout or stderr? -- cheers, Thorsten