emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Bug or not a bug? dot expansion in ob-shell


From: Diego Zamboni
Subject: Re: Bug or not a bug? dot expansion in ob-shell
Date: Wed, 19 Feb 2020 20:43:58 +0100

I'm late to the discussion so I apologize in advance, but this fix seems counterintuitive to me. In my mind, for any shell code:

- Return value: exit code of the last command
- Output: whatever the commands print

So to me, it's intuitive that =:exports value= would return the exit code of the last command, and =:exports output= would produce the output of the commands. I don't understand why a new option is needed.

Am I missing something?

--Diego


On Wed, Feb 19, 2020 at 5:00 PM Bastien <address@hidden> wrote:
I've implemented the suggestion I made in master:

  New option ~ob-shell-return-value-is-exit-status~

  When set to =t=, consider the return value of a shell source code
  block is the exit status of its last command. 

  The default for this option is =nil=, i.e. the return value of a shell
  block is the output of the commands.

  You can turn this on individual blocks by setting the header argument
  =:value-is-exit-status= to =t=.

Please test and let me know if it works.

Thanks for bringing this up!

--
 Bastien


reply via email to

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