From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Bug or not a bug? dot expansion in ob-shell Date: Wed, 19 Feb 2020 14:00:02 +0100 Message-ID: <871rqqag19.fsf@bzg.fr> References: <87eeur3p1p.fsf@ucl.ac.uk> <87a75eap8k.fsf@gnu.org> <87y2sy3kkl.fsf@ucl.ac.uk> <87r1yq4xiz.fsf@gnu.org> <875zg2kcy0.fsf@ucl.ac.uk> <87h7zmiw0v.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59576) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4OxU-0005XC-E0 for emacs-orgmode@gnu.org; Wed, 19 Feb 2020 08:00:09 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Tim Cross Cc: emacs-orgmode@gnu.org Hi Tim, thanks for your proposal. I think we agree here. My suggestion is to have a new option ob-shell-value-is-exit-status. When set to nil (the default), the "return value" of a shell source block would be the output of the last command. This is the current behavior where we have e.g. #+begin_src shell echo "Hello!" #+end_src #+RESULTS: : Hello! When set to t, the return value of a shell source block would be the exit code of the last command. This would be useful for side effect and other use cases. We can also consider a specific parameter :value-is-exit-code to set for individual blocks--useful for noweb. My only point is I don't think ob-shell-value-is-exit-status should be t by default, as it would cause all shell blocks to return the status code by default, which may not be what most users want. Anyway, I don't have yet a clue on how to add this new option. I'll leave it to Eric first (if he has time) then look at it later this week. Thanks! -- Bastien