From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: diff in `src' blocks Date: Mon, 13 May 2013 08:30:34 +0000 (UTC) Message-ID: References: <877gj3pc5v.fsf@kerstf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubo9u-0000zv-MM for emacs-orgmode@gnu.org; Mon, 13 May 2013 04:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubo9t-0005nz-3k for emacs-orgmode@gnu.org; Mon, 13 May 2013 04:31:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:46136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubo9s-0005ni-RL for emacs-orgmode@gnu.org; Mon, 13 May 2013 04:31:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ubo9n-0002mN-0b for emacs-orgmode@gnu.org; Mon, 13 May 2013 10:30:55 +0200 Received: from 217.10.52.10 ([217.10.52.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 May 2013 10:30:55 +0200 Received: from Stromeko by 217.10.52.10 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 May 2013 10:30:55 +0200 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 Oliver Večerník vecernik.at> writes: > Why is the `diff' command alone not exported while the piped `diff' via > `cat' works? The exit code is not zero since diff found differences, so Babel assumes the script produced an error. Try this instead when you don't know what the return code of the last command will be or if you know that it isn't zero even when no error occured: #+BEGIN_SRC sh :exports results :results output diff testdiff.txt.orig testdiff.txt : #+END_SRC > Is this this a bug? I don't think so, although Babel could give a more enlightening message about why it didn't evaluate STDOUT. It gives this on your original example: Babel evaluation exited with code 1 Code block produced no output. Regards, Achim.