all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BABEL] Redirect stderr to stdout?
@ 2012-03-02 11:29 Viktor Rosenfeld
  2012-03-02 16:21 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Viktor Rosenfeld @ 2012-03-02 11:29 UTC (permalink / raw
  To: emacs-orgmode

Hi,

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
<<exp8-test-query>>
#+END_SRC

#+RESULTS:
: 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:

 count 
 -------
 95977
 (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.

Cheers,
Viktor

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-03 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 11:29 [BABEL] Redirect stderr to stdout? Viktor Rosenfeld
2012-03-02 16:21 ` Eric Schulte
2012-03-02 19:47   ` Viktor Rosenfeld
2012-03-02 20:23     ` Eric Schulte
2012-03-03 15:52       ` Viktor Rosenfeld

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.