From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan Andersson Newsgroups: gmane.emacs.help Subject: Redirect Output Date: Tue, 30 Mar 2010 21:23:26 +0000 Message-ID: <929ccd881003301423r6e405f6fped5d5849b7899831@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d976ef7beff404830b3dc5 X-Trace: dough.gmane.org 1269985014 9980 80.91.229.12 (30 Mar 2010 21:36:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 21:36:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 30 23:36:50 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwj7C-0002wg-FZ for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Mar 2010 23:36:50 +0200 Original-Received: from localhost ([127.0.0.1]:52656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwj7B-0001sM-UR for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Mar 2010 17:36:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwj3P-0000Jn-9q for help-gnu-emacs@gnu.org; Tue, 30 Mar 2010 17:32:55 -0400 Original-Received: from [140.186.70.92] (port=35090 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwj3L-00009R-I5 for help-gnu-emacs@gnu.org; Tue, 30 Mar 2010 17:32:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwiuI-0001fd-NJ for help-gnu-emacs@gnu.org; Tue, 30 Mar 2010 17:23:31 -0400 Original-Received: from mail-ww0-f41.google.com ([74.125.82.41]:62548) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwiuG-0001fY-79 for help-gnu-emacs@gnu.org; Tue, 30 Mar 2010 17:23:30 -0400 Original-Received: by wwb18 with SMTP id 18so136477wwb.0 for ; Tue, 30 Mar 2010 14:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=iO3mKTrv+P8qbZSyts37YpDJfyNeRs0JZjyP3MCALEI=; b=CmWReX3N16sP1R60jcDEo3p84/cit6ln/14aBinzm4R8S31z7qr5ttND+9pnN+yohF atCy1fU0RUfp4zPPmhJrnp71zIpUAHDp4VwN+k4j8Hq8+hTed/6Lqn2fFydokuTYTrED wcKy0BzVZBoW+/N/i8fboWRAEVwMLMjwZmDGU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=sneksz9kdYNNChzQqlkqe6fUbklu+5FruVNDaj4ZgFd5X06PsTwhXl2Tv3F1rsKo1Y j2MXEJVVV3ZZk6h61aVsFNutVbebuORPE1sIwcfx0+TGZiKIZMk8pCNQHLCmdtRUM3ZG Ck5X1dEiy3g9MqD1LgcwwbJyGRNQSh3ym22T4= Original-Received: by 10.216.20.198 with HTTP; Tue, 30 Mar 2010 14:23:26 -0700 (PDT) Original-Received: by 10.216.85.12 with SMTP id t12mr4288364wee.158.1269984206253; Tue, 30 Mar 2010 14:23:26 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72546 Archived-At: --0016e6d976ef7beff404830b3dc5 Content-Type: text/plain; charset=ISO-8859-1 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? --0016e6d976ef7beff404830b3dc5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hey,

I have a batch program where I run some = Elisp functions and then print=A0some results. The problem is that some of = the functions I'm calling=A0produces output. And I don't want that.= So I'm basically looking=A0for a way to only output my printing.

The first I thought about was redirecting stdout to som= ething else. Like this:


#!/usr/bin/= emacs --script

(let* ((buffer (get-buffer-create &= quot;output"))
=A0=A0 =A0 =A0 (standard-output buffer))
=A0=A0(print "= some printing"))

=A0=A0
That works = fine, except that it does not bite on message. Like this:


#!/usr/bin/emacs --script =A0
(let* ((buffer (get-buff= er-create "output"))
=A0=A0 =A0 =A0 (standard-output bu= ffer))
=A0=A0(message "some message"))


Any ideas how I can solve this? =A0

--0016e6d976ef7beff404830b3dc5--