all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: William Gardella <gardellawg@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Calling emacsclient
Date: Wed, 14 Nov 2012 12:22:08 -0500	[thread overview]
Message-ID: <878va4nlq7.fsf@gmail.com> (raw)
In-Reply-To: mailman.12968.1352901198.855.help-gnu-emacs@gnu.org

Hi again, I had some further notes/thoughts for clarification.

Thorsten Jolitz <tjolitz@googlemail.com> 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/)


  parent reply	other threads:[~2012-11-14 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.12766.1352681489.855.help-gnu-emacs@gnu.org>
2012-11-12  5:03 ` Calling emacsclient William Gardella
2012-11-12 13:04   ` Thorsten Jolitz
2012-11-12 14:15     ` Suvayu Ali
2012-11-12 14:58       ` Thorsten Jolitz
2012-11-14 13:53   ` Thorsten Jolitz
     [not found]   ` <mailman.12968.1352901198.855.help-gnu-emacs@gnu.org>
2012-11-14 17:10     ` William Gardella
2012-11-14 20:08       ` Thorsten Jolitz
2012-11-14 17:22     ` William Gardella [this message]
2012-11-14 17:23       ` William Gardella
2012-11-14 20:01       ` Thorsten Jolitz
2012-11-12  0:51 Thorsten Jolitz

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=878va4nlq7.fsf@gmail.com \
    --to=gardellawg@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.