all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* batch mode
@ 2008-03-02 18:50 Sebastian Tennant
  2008-03-02 22:22 ` Peter Dyballa
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Tennant @ 2008-03-02 18:50 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

By default Emacs in batch mode sends 'message's to stderr.

Is it possible to put a directive in the file loaded with the '-l'
switch, that tells Emacs to send 'message's to stdout instead?

Sebastian





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

* Re: batch mode
  2008-03-02 18:50 batch mode Sebastian Tennant
@ 2008-03-02 22:22 ` Peter Dyballa
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2008-03-02 22:22 UTC (permalink / raw)
  To: Sebastian Tennant; +Cc: help-gnu-emacs


Am 02.03.2008 um 19:50 schrieb Sebastian Tennant:

> Is it possible to put a directive in the file loaded with the '-l'
> switch, that tells Emacs to send 'message's to stdout instead?


Do you that in shell it's possible unite stderr and stdout?

--
Greetings

   Pete

There is no national science just as there is no national  
multiplication table; what is national is no longer science.
				– Anton Checov







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

* Re: batch mode
       [not found] <mailman.8180.1204483870.18990.help-gnu-emacs@gnu.org>
@ 2008-03-03  0:34 ` Pascal Bourguignon
  2008-03-03  9:36   ` Sebastian Tennant
       [not found]   ` <mailman.8214.1204537035.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Pascal Bourguignon @ 2008-03-03  0:34 UTC (permalink / raw)
  To: help-gnu-emacs

Sebastian Tennant <sebyte@smolny.plus.com> writes:

> Hi all,
>
> By default Emacs in batch mode sends 'message's to stderr.
>
> Is it possible to put a directive in the file loaded with the '-l'
> switch, that tells Emacs to send 'message's to stdout instead?

Why use message if message doesn't do what you want?  Use print!
(and princ, terpri, etc).

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

READ THIS BEFORE OPENING PACKAGE: According to certain suggested
versions of the Grand Unified Theory, the primary particles
constituting this product may decay to nothingness within the next
four hundred million years.


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

* Re: batch mode
  2008-03-03  0:34 ` Pascal Bourguignon
@ 2008-03-03  9:36   ` Sebastian Tennant
       [not found]   ` <mailman.8214.1204537035.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Sebastian Tennant @ 2008-03-03  9:36 UTC (permalink / raw)
  To: help-gnu-emacs

Quoth Pascal Bourguignon <pjb@informatimago.com>:
> Sebastian Tennant <sebyte@smolny.plus.com> writes:
>
>> Hi all,
>>
>> By default Emacs in batch mode sends 'message's to stderr.
>>
>> Is it possible to put a directive in the file loaded with the '-l'
>> switch, that tells Emacs to send 'message's to stdout instead?
>
> Why use message if message doesn't do what you want?  Use print!
> (and princ, terpri, etc).

It's not my code, and there are a lot of messages in there!

Peter, of course 2>&1 works in a shell, but my guile script calls emacs
directly to avoid the overhead of the shell.

It turns out, guile has good port redirection routines and I'm able to
route stderr programmatically within the script.

Thanks to you both.

Sebastian





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

* Re: batch mode
       [not found]   ` <mailman.8214.1204537035.18990.help-gnu-emacs@gnu.org>
@ 2008-03-11 21:18     ` Brendan Halpin
  0 siblings, 0 replies; 5+ messages in thread
From: Brendan Halpin @ 2008-03-11 21:18 UTC (permalink / raw)
  To: help-gnu-emacs

Can I hijack the thread to ask if there is a way of suppressing the
"Loading" and related start-up messages when using the
#!/usr/bin/emacs --script
convention?

At present this:
-------------------------------------------------------------------
#!/usr/bin/emacs --script
(princ "Hello World!\n")
-------------------------------------------------------------------

generates the following output:
-------------------------------------------------------------------
brendan@annacotty:/tmp$ ./hw.el 
Loading 00debian-vars...
Loading /etc/emacs-snapshot/site-start.d/50auctex.el (source)...
Loading /usr/share/emacs/23.0.50/site-lisp/auctex.el (source)...
Loading /usr/share/emacs/23.0.50/site-lisp/preview-latex.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Skipping dictionaries-common setup for emacs-snapshot
Loading /etc/emacs/site-start.d/50gcl.el (source)...
Loading /etc/emacs/site-start.d/50slime.el (source)...
Loading /usr/share/emacs-snapshot/site-lisp/slime/slime-autoloads...
Hello World!
-------------------------------------------------------------------

Adding options like -q and --no-site-file to the bang line don't seem to
have any effect, and this makes Emacs unattractive for small scripts. 

Brendan
-- 
Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:brendan.halpin@ul.ie  http://www.ul.ie/sociology/brendan.halpin.html


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

end of thread, other threads:[~2008-03-11 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-02 18:50 batch mode Sebastian Tennant
2008-03-02 22:22 ` Peter Dyballa
     [not found] <mailman.8180.1204483870.18990.help-gnu-emacs@gnu.org>
2008-03-03  0:34 ` Pascal Bourguignon
2008-03-03  9:36   ` Sebastian Tennant
     [not found]   ` <mailman.8214.1204537035.18990.help-gnu-emacs@gnu.org>
2008-03-11 21:18     ` Brendan Halpin

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.