emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@NexGo.DE>
To: emacs-orgmode@gnu.org
Subject: Re: diff in `src' blocks
Date: Mon, 13 May 2013 08:30:34 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130513T101312-409@post.gmane.org> (raw)
In-Reply-To: 877gj3pc5v.fsf@kerstf.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.

  parent reply	other threads:[~2013-05-13  8:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13  7:33 diff in `src' blocks Oliver Večerník
2013-05-13  8:07 ` Oliver Večerník
2013-05-13  8:32   ` Achim Gratz
2013-05-13  9:29     ` Oliver Večerník
2013-05-13  8:30 ` Achim Gratz [this message]
2013-05-13 17:59   ` Achim Gratz
2013-05-13 19:23     ` Samuel Wales
2013-05-14  9:07     ` Michael Brand
2013-05-14  9:12       ` Michael Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130513T101312-409@post.gmane.org \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).