emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] diff in `src' blocks


From: Achim Gratz
Subject: Re: [O] diff in `src' blocks
Date: Mon, 13 May 2013 08:30:34 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Oliver Večerník <ov <at> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]