From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [BABEL] Redirect stderr to stdout? Date: Fri, 02 Mar 2012 13:23:09 -0700 Message-ID: <87booelpew.fsf@gmx.com> References: <20120302112909.GA25186@kenny.local> <87mx7znfbu.fsf@gmx.com> <20120302194714.GB27465@kenny.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3Z5J-0006R4-T5 for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 15:28:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3Z4z-0007aB-75 for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 15:28:13 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:50924) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S3Z4z-0007Zl-0L for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 15:27:53 -0500 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 Viktor Rosenfeld writes: > Hi Eric, > > Eric Schulte wrote: > >> Currently the only action Babel takes with STDERR is to display it in a >> pop-up buffer when code block evaluation fails. > > On my system (OS X) the buffer does not popup. I just tried > > #+BEGIN_SRC sh > echo foo 1>&2 > #+END_SRC > That is because the evaluation did not fail, try #+BEGIN_SRC sh echo foo 1>&2 exit 1 #+END_SRC > > in Aquamacs and Cocoa Emacs. Strangely, the output seems to be lost > entirely. I don't pretend to understand the many oddities of Aquamacs, and I don't know what Cocoa Emacs is. > Normally, stderr is captured in another buffer which I have to open > manually. > >> It would certainly be >> possible to add :results header argument to incorporate STDERR into >> results (and this desire has been expressed previously). Reasonable >> combination options would likely include (at least) the following. >> >> | stderr-only | return stderr instead of stdout | >> | 2>&1 | interleave stderr and stdout | >> | concat | add stderr to the end of stdout | >> | list | return a list of stderr and stdotu | >> >> The best (read simple and extensible) implementation and syntax for this >> behavior is not obvious to me (and I simply don't have time). If you >> (or anyone on the list) have any interest in hacking elisp code the >> place to start would be `org-babel-eval' for a serious implementation, >> or an quick hack may be possible through customization of the >> `org-babel-eval-error-notify' function. >> >> Hope this helps. > > Okay, thanks. My elisp skills are very rudimentary and this is beyond > me. Maybe somebody else will pick it up if the interest is big enough. > This feature has been requested previously on the mailing list, so there is certainly demand. As always demand outstrips development resources. Best, > > Cheers, > Viktor > -- Eric Schulte http://cs.unm.edu/~eschulte/