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)]

2011-08-29 Thread Michael Brand
Hi Eric On Tue, Aug 23, 2011 at 19:13, Eric Schulte schulte.e...@gmail.com wrote: Note that during interactive evaluation if the exit status is non-0 then STDERR will be dumped into a babel error buffer which will be poped up, so this information will not be silently discarded. Thanks for

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)]

2011-08-23 Thread Achim Gratz
Michael Brand michael.ch.br...@gmail.com writes: If the shell is a special case for babel anyway, why not something like the following? Ehm, no. But I think that it would be generally useful (not just for shell blocks) to be able to capture stderr, either together with stdout or separately

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)]

2011-08-23 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes: Michael Brand michael.ch.br...@gmail.com writes: If the shell is a special case for babel anyway, why not something like the following? Ehm, no. But I think that it would be generally useful (not just for shell blocks) to be able to capture stderr,

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)]

2011-08-23 Thread Eric Schulte
Michael Brand michael.ch.br...@gmail.com writes: Hi Eric 2011/8/20 Eric Schulte schulte.e...@gmail.com: [...] I would lean towards thinking that passing along error messages is more important than returning error codes, but if the community thinks differently I'm happy to change the ob-sh

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)]

2011-08-22 Thread Michael Brand
Hi Eric 2011/8/20 Eric Schulte schulte.e...@gmail.com: [...] I would lean towards thinking that passing along error messages is more important than returning error codes, but if the community thinks differently I'm happy to change the ob-sh behavior. A non-zero exit status and stderr of a

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)]

2011-08-21 Thread Eric Schulte
András Major andras.g.ma...@gmail.com writes: 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

[O] Bug: babel: results switch (output vs. value) has no or wrong effect for sh source block [7.7 (release_7.7.107.g7a82)]

2011-08-19 Thread Andras Major
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: :

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)]

2011-08-19 Thread Eric Schulte
Andras Major andras.g.ma...@gmail.com 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

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)]

2011-08-19 Thread András Major
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

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)]

2011-08-19 Thread Achim Gratz
András Major andras.g.ma...@gmail.com writes: This would be most easily done using an sh block which returns a numeric exit code. No one keeps you from using echo $? in the last line of that shell block. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

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)]

2011-08-19 Thread Sebastien Vauban
Hi Achim, Achim Gratz wrote: András Major andras.g.ma...@gmail.com writes: This would be most easily done using an sh block which returns a numeric exit code. No one keeps you from using echo $? in the last line of that shell block. Even if this is a smart workaround, it don't think