emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Viktor Rosenfeld <listuser36@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: [BABEL] Redirect stderr to stdout?
Date: Fri, 2 Mar 2012 12:29:09 +0100	[thread overview]
Message-ID: <20120302112909.GA25186@kenny.local> (raw)


is there a way to capture stderr output of a babel block and have it
appear in the results block (instead of being printed in the *Shell
Command Output* buffer)? On sh blocks I could redirect myself, but I'm
trying to capture the output of psql (the PostgreSQL client).

Specifically, I have the following code block:

#+BEGIN_SRC sql :noweb yes :results output verbatim
\timing on

: count
: 95977

The \timing directive causes psql to print the runtime of the query on
stderr. If I run the query on the psql command line, the following
output appears:

 (1 row)

 Time: 1895,558 ms

I suppose that duplicating this output in Babel would be difficult,
because it interferes with the parsing of the result set.


             reply	other threads:[~2012-03-02 11:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 11:29 Viktor Rosenfeld [this message]
2012-03-02 16:21 ` [BABEL] Redirect stderr to stdout? Eric Schulte
2012-03-02 19:47   ` Viktor Rosenfeld
2012-03-02 20:23     ` Eric Schulte
2012-03-03 15:52       ` Viktor Rosenfeld

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:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120302112909.GA25186@kenny.local \
    --to=listuser36@googlemail.com \
    --cc=emacs-orgmode@gnu.org \


* 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.
Code repositories for project(s) associated with this public inbox


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).