emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jack Kamm <jackkamm@gmail.com>
To: Nick Dokos <ndokos@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug or not a bug? dot expansion in ob-shell
Date: Fri, 21 Feb 2020 22:23:49 -0800	[thread overview]
Message-ID: <87tv3jjg22.fsf@gmail.com> (raw)
In-Reply-To: <8736b36492.fsf@alphaville.usersys.redhat.com>

Hi,

Nick Dokos <ndokos@gmail.com> writes:

>> That said, we have three solutions:
>>
>> 1. Stick to a strict reading of Org and bash manuals: the absence of a
>>    :results header means "return the value, i.e. the exit status".
>>
>> 2. Deviate from this strict reading, introduce an exception for *all*
>>    shell blocks: no :results header means "return output" and you need
>>    to use :results value to get the exit status (your proposal).
>>
>> 3. Deviate from this strict reading and introduce an option that says:
>>    "Don't deviate from the Org's and bash manuals for all src blocks".
>>
>> Obviously, nobody wants the first solution.
>
> I'm not convinced of that: personally, I would be happy with the first
> solution and maybe others would be too.
> 
> My longer term suggestion (which, I realize, does not help to close
> *this* case any time soon):
> 
> I think that the global default setting `:results value' is wrong

Strongly agree with Nick on both points here. I prefer option 1 over
options 2 and 3, I think it is the more consistent and simple behavior.

I also think ":results value" is a problematic default.

Anecdotally, I use Org-Babel as a computational notebook similar to
Jupyter or Rmarkdown, and set ":session :results output" for nearly all
my org-babel blocks.

Of course, there are many ways in which org-babel can be used, and for
some uses, ":results value" is the better default. But for other use
cases, including shell blocks, ":results output" is the more intuitive
default.

And I think this is really the problem here. The result of a shell block
is surprising to the new user, because the user probably wants ":results
output", but ":results value" is the default. I'm not sure of the
solution to this problem, but I don't think it's to change the meaning
of ":results value".

  reply	other threads:[~2020-02-22  6:25 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  9:02 Bug or not a bug? dot expansion in ob-shell Vladimir Nikishkin
2020-02-19  9:27 ` Fraga, Eric
2020-02-19  9:41   ` Bastien
2020-02-19  9:43     ` Bastien
2020-02-19  9:57       ` Bastien
2020-02-19 11:03     ` Fraga, Eric
2020-02-19 11:38       ` Bastien
2020-02-19 11:56         ` Fraga, Eric
2020-02-19 12:06           ` Vladimir Nikishkin
2020-02-19 12:10           ` Bastien
2020-02-19 12:27             ` Bastien
2020-02-27 14:25             ` Kaushal Modi
2020-02-19 12:47           ` Tim Cross
2020-02-19 13:00             ` Bastien
2020-02-19 13:15               ` Tim Cross
2020-02-19 13:23                 ` Bastien
2020-02-19 13:31               ` Fraga, Eric
2020-02-19 13:43                 ` Bastien
2020-02-19 14:05                   ` Fraga, Eric
2020-02-19 16:00                     ` Bastien
2020-02-19 19:43                       ` Diego Zamboni
2020-02-19 20:41                         ` Samuel Wales
2020-02-19 21:32                         ` Bastien
2020-02-20 20:37                           ` Nick Dokos
2020-02-20 21:01                             ` Tim Cross
2020-02-21  6:55                               ` Derek Feichtinger
2020-02-21  8:04                             ` Bastien
2020-02-21 21:04                               ` Nick Dokos
2020-02-22  6:23                                 ` Jack Kamm [this message]
2020-02-22 13:37                                 ` Bastien
2020-02-23  9:50                                   ` Stefan Nobis
2020-02-23 13:13                                     ` Bastien
2020-02-23 16:13                                     ` Jack Kamm
2020-02-23 20:44                                       ` Bastien
2020-02-29 15:35                                   ` Jack Kamm
2020-02-29 15:39                                     ` Jack Kamm
2020-03-01  2:08                                       ` Tom Gillespie
2020-03-01  3:50                                         ` Tim Cross
2020-03-04 18:41                                           ` Nick Dokos
2020-09-06 17:33                                           ` Bastien
2020-03-01  4:09                                         ` Jack Kamm
2020-03-01  5:07                                           ` Tom Gillespie
2020-03-01  5:58                                             ` Jack Kamm
2020-03-01 15:46                                               ` Jack Kamm
2020-09-06 17:36                                                 ` Bastien
2020-09-07 17:39                                                   ` Bastien
2020-02-23 15:27                               ` Fraga, Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv3jjg22.fsf@gmail.com \
    --to=jackkamm@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).