emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: babel: results switch (output vs. valu e) has no or wrong e


From: András Major
Subject: Re: [O] Bug: babel: results switch (output vs. valu e) has no or wrong effect for sh source block [7 .7 (release_7.7.107.g7a82)]
Date: Fri, 19 Aug 2011 18:52:48 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi Eric,

> If we did return the value of shell scripts then ":results value" would
> almost always simply return 0 (or possibly an error message).  For this
> reason shell code blocks do not implement value returns, but rather will
> always collect results from STDOUT.

I think that this unnecessarily throws away potentially useful
functionality.  Example: I want to fill a table with data such that
the value of a cell depends on whether a file (whose path is specified
by another cell, for instance) exists or not.  This would be most
easily done using an sh block which returns a numeric exit code.  I
don't see a reason for making clandestine exceptions to the rules in
the manual and strongly suggest that the output and value options be
honoured for every language.

In order not to break existing Org files, I would suggest that the
default choice between value and output (when not explicitly
specified) depend on the language.  With this functionality, sh code
blocks that don't specify ":results output" will still work as they
did before.

  András





reply via email to

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