all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: emacsclient - load file and recieve output
Date: Sat, 13 Jul 2013 11:53:41 +0200	[thread overview]
Message-ID: <87li5ayee2.fsf@gmail.com> (raw)


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




                 reply	other threads:[~2013-07-13  9:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87li5ayee2.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.