emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Output to shell when calling emacsclient?
@ 2011-10-22 18:42 Herbert Sitz
  2011-10-22 19:22 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Sitz @ 2011-10-22 18:42 UTC (permalink / raw)
  To: emacs-orgmode

I'm running --eval commands from the shell using emacsclient (and on windows
emacsclientw).  

The --batch option does not seem to be an option with emacsclient, although it
works fine with plain emacs.  However, I would still like to print output to the
shell that I'm issuing the emacsclient command in.  Is there some way to do this?

Thanks,

Herb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Output to shell when calling emacsclient?
  2011-10-22 18:42 Output to shell when calling emacsclient? Herbert Sitz
@ 2011-10-22 19:22 ` Nick Dokos
  2011-10-22 20:37   ` Herbert Sitz
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2011-10-22 19:22 UTC (permalink / raw)
  To: Herbert Sitz; +Cc: nicholas.dokos, emacs-orgmode

Herbert Sitz <hesitz@gmail.com> wrote:

> I'm running --eval commands from the shell using emacsclient (and on windows
> emacsclientw).  
> 
> The --batch option does not seem to be an option with emacsclient, although it
> works fine with plain emacs.  However, I would still like to print output to the
> shell that I'm issuing the emacsclient command in.  Is there some way to do this?
> 

The message function will cause output to the echo area of emacs as well as to the
standard output of the emacsclient command:

,----
| $ emacsclient --eval '(message "Hi there")'
| "Hi there"
`----

Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Output to shell when calling emacsclient?
  2011-10-22 19:22 ` Nick Dokos
@ 2011-10-22 20:37   ` Herbert Sitz
  2011-10-23 16:47     ` Herbert Sitz
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Sitz @ 2011-10-22 20:37 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <nicholas.dokos <at> hp.com> writes:
> The message function will cause output to the echo area of emacs as well 
> as to the
> standard output of the emacsclient command:
> ,----
> | $ emacsclient --eval '(message "Hi there")'
> | "Hi there"
> `----

Nick --  Thanks, it does indeed work for me in Linux.  

Can't get it to work in Windows, though.  In Windows it runs in the gui server
with correct output in Emacs server in the Messages buf and on the minibuf
command line.  But not output in the terminal.

Strange because I can get the shell to redirect the output to a file:

> emacsclientw --eval ^"(message \^"Hi there\^")^" >  output.txt

But if I don't enter the redirect to a file the output never shows up in the
terminal.

Maybe someone knows the explanation for this?

-- Herb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Output to shell when calling emacsclient?
  2011-10-22 20:37   ` Herbert Sitz
@ 2011-10-23 16:47     ` Herbert Sitz
  0 siblings, 0 replies; 4+ messages in thread
From: Herbert Sitz @ 2011-10-23 16:47 UTC (permalink / raw)
  To: emacs-orgmode

Herbert Sitz <hesitz <at> gmail.com> writes:

> Can't get it to work in Windows, though.  In Windows it runs in the gui server
> with correct output in Emacs server in the Messages buf and on the minibuf
> command line.  But not output in the terminal.
> 

In case anyone cares -- I know the number of people using emacsclientw is
probably tiny -- the workaround I'm using in Windows is just to 
pipe it to 'cat'.  So this does work to output on the terminal:

> emacsclientw --eval ^"(message \^"Hi there\^")^" | cat

-- Herb

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-23 16:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-22 18:42 Output to shell when calling emacsclient? Herbert Sitz
2011-10-22 19:22 ` Nick Dokos
2011-10-22 20:37   ` Herbert Sitz
2011-10-23 16:47     ` Herbert Sitz

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).