From: Johan Andersson <johan.rejeep@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Redirect Output
Date: Tue, 30 Mar 2010 22:14:52 +0000 [thread overview]
Message-ID: <929ccd881003301514n1aa14473kffd0c4fb37d022dc@mail.gmail.com> (raw)
In-Reply-To: <e01d8a51003301508g35c6f87dsf6b27588d297a1f9@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]
Lennart, You're almost my private Emacs tutor :)
Didn't know about advicing! Looks like it could solve it! I will look into
it and get back with the results. But that'll have to wait until tomorrow.
Thanks!
On Tue, Mar 30, 2010 at 10:08 PM, Lennart Borgman <lennart.borgman@gmail.com
> wrote:
> 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?
>
[-- Attachment #2: Type: text/html, Size: 1896 bytes --]
next prev parent reply other threads:[~2010-03-30 22:14 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
2010-03-30 22:14 ` Johan Andersson [this message]
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=929ccd881003301514n1aa14473kffd0c4fb37d022dc@mail.gmail.com \
--to=johan.rejeep@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.
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).