From: Lennart Borgman <lennart.borgman@gmail.com>
To: Johan Andersson <johan.rejeep@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Redirect Output
Date: Wed, 31 Mar 2010 00:08:16 +0200 [thread overview]
Message-ID: <e01d8a51003301508g35c6f87dsf6b27588d297a1f9@mail.gmail.com> (raw)
In-Reply-To: <929ccd881003301423r6e405f6fped5d5849b7899831@mail.gmail.com>
On Tue, Mar 30, 2010 at 11:23 PM, Johan Andersson
<johan.rejeep@gmail.com> wrote:
> Hey,
> I have a batch program where I run some Elisp functions and then print some
> results. The problem is that some of the functions I'm calling produces
> output. And I don't want that. So I'm basically looking for a way to only
> output my printing.
> The first I thought about was redirecting stdout to something else. Like
> this:
>
> #!/usr/bin/emacs --script
> (let* ((buffer (get-buffer-create "output"))
> (standard-output buffer))
> (print "some printing"))
>
> That works fine, except that it does not bite on message. Like this:
>
> #!/usr/bin/emacs --script
> (let* ((buffer (get-buffer-create "output"))
> (standard-output buffer))
> (message "some message"))
>
> Any ideas how I can solve this?
defadvice the `message' function?
next prev parent reply other threads:[~2010-03-30 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 21:23 Redirect Output Johan Andersson
2010-03-30 22:08 ` Lennart Borgman [this message]
2010-03-30 22:14 ` Johan Andersson
2010-03-31 12:41 ` Johan Andersson
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e01d8a51003301508g35c6f87dsf6b27588d297a1f9@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=johan.rejeep@gmail.com \
/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.
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).