[Top][All Lists]
[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/
- [O] Bug: babel: results switch (output vs. value) has no or wrong effect for sh source block [7.7 (release_7.7.107.g7a82)], Andras Major, 2011/08/19
- 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)],
Eric Schulte <=
- 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)], András Major, 2011/08/19
- 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)], Achim Gratz, 2011/08/19
- 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)], Sebastien Vauban, 2011/08/19
- 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)], Sebastien Vauban, 2011/08/19
- 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)], Eric Schulte, 2011/08/21
- 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)], Michael Brand, 2011/08/22
- 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)], Achim Gratz, 2011/08/23
- 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)], Eric Schulte, 2011/08/23
- 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)], Eric Schulte, 2011/08/23
- 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)], Michael Brand, 2011/08/29