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. value) has no or wrong ef


From: Eric Schulte
Subject: Re: [O] Bug: babel: results switch (output vs. value) has no or wrong effect for sh source block [7.7 (release_7.7.107.g7a82)]
Date: Fri, 19 Aug 2011 07:33:54 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andras Major <address@hidden> writes:

> Hello, here is an example of apparently erroneous behaviour of the
> :results switch.  In this example, we use an sh block, but it also
> appears to affect other languages (will need more investigation).
>
> Example Org code:
>
> #+begin_src sh :exports output
>   echo "Hello World 1"
> #+end_src
>
> #+results:
> : Hello World 1
>
> #+begin_src sh :exports value
>   echo "Hello World 2"
> #+end_src
>
> #+results:
> : Hello World 2
>
> Am I missing something here or should the second instance really
> output something like an integer exit value from echo?
>

Hi András,

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.

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

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