unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Johan Andersson <johan.rejeep@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Redirect Output
Date: Tue, 30 Mar 2010 21:23:26 +0000	[thread overview]
Message-ID: <929ccd881003301423r6e405f6fped5d5849b7899831@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 1064 bytes --]

             reply	other threads:[~2010-03-30 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 21:23 Johan Andersson [this message]
2010-03-30 22:08 ` Redirect Output Lennart Borgman
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=929ccd881003301423r6e405f6fped5d5849b7899831@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).