From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: [BABEL] Redirect stderr to stdout? Date: Fri, 2 Mar 2012 12:29:09 +0100 Message-ID: <20120302112909.GA25186@kenny.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3Qfq-0000Xq-Oc for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 06:29:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3Qfk-0004Ma-3J for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 06:29:22 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:37349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3Qfj-0004MC-PT for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 06:29:16 -0500 Received: by bkwq16 with SMTP id q16so1679875bkw.0 for ; Fri, 02 Mar 2012 03:29:13 -0800 (PST) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 <> #+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