emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends
Date: Tue, 21 May 2024 11:34:16 +0000	[thread overview]
Message-ID: <874jarjt53.fsf@localhost> (raw)
In-Reply-To: <v2ht08$c83$1@ciao.gmane.io>

Max Nikulin <manikulin@gmail.com> writes:

> Frankly speaking your plan is not clear for me. My special concern is 
> DWIM behavior
> https://list.orgmode.org/874jbkcmyg.fsf@localhost
> (Ihor Radchenko Mon, 29 Apr 2024 13:33:59 +0000)
> and
>
>       #+begin_src sh :script-args 1 ; touch /tmp/not-an-arg
>
> if you are going to pass it literally to "sh -c" then it is 
> :script-cmdline rather than :script-args.

Your pathological example is not how we encourage these header arguments
to be used. Their intended purpose is serving as arguments, not to
complete the cmdline. Anything else is implementation details we may or
may not change in future. It need not be reflected in the header
argument names. So, I stand on the :*-args names.

> I expect a way to explicitly specify if it is a single argument or 
> multiple ones
>
>      #+begin_src sh :script-args '("a b c")
>
> vs.
>
>      #+begin_src sh :script-args '("a" "b" "c")

Max, I believe that we discussed this. This problem has nothing to do
with introducing new header arguments. It is just a question of how we
pass these header arguments to scripts. Your concerns must not stop Matt
from working on the proposed patch.

> As to literal command line, taking into account stripped outer quotes 
> issue, I do not like requirement to quote characters for shells. Even 
> splitting string into arguments using `read' might be better, but there 
> are still enough issues.

I fail to see how this relates to new header arguments.

> Besides interpreters, there is may be a stack of "launchers" like 
> toolbox in the case of applications installed as isolated flatpak/snap 
> packages:
>
> Florin Boariu to emacs-orgmode. org-ditaa woes. Thu, 19 Oct 2023 
> 12:59:59 +0200.
> https://list.orgmode.org/ZTEML8zWrB6kQflk@toolbox

This is also out of scope of the discussed header arguments. Using
custom interpreter (flapak-spawn ... bash instead of default bash) has
nothing to do with script/interpreter arguments. We may (and should)
discuss that question separately.

Let's not raise all the possible related concerns at once, unless they
cannot be resolved in future because of the discussed patch. Otherwise,
it is almost impossible to make _incremental_ progress.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-05-21 11:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18 15:54 [BUG] ob-shell: :shebang changes interpretation of :cmdline Max Nikulin
2023-11-18 18:09 ` Matt
2023-12-04 13:58   ` Ihor Radchenko
2023-12-04 20:41     ` Matt
2023-11-18 18:20 ` [BUG] ob-shell: :cmdline fails with single argument (was Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline) Matt
2023-11-19  6:57   ` Max Nikulin
2023-11-19  7:57     ` Matt
2024-04-21 15:09 ` [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline Matt
2024-04-23 10:28   ` Ihor Radchenko
2024-04-24 10:33     ` Max Nikulin
2024-04-24 12:52       ` Ihor Radchenko
2024-04-25 10:06         ` Max Nikulin
2024-04-26 11:49         ` Ihor Radchenko
2024-04-27 10:31           ` Max Nikulin
2024-04-27 13:37             ` Max Nikulin
2024-04-28 12:34             ` Ihor Radchenko
2024-04-23 10:51   ` Max Nikulin
2024-04-23 17:08     ` Max Nikulin
2024-04-26 13:09     ` [DISCUSSION] The meaning of :cmdline header argument across babel backends (was: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline) Ihor Radchenko
2024-04-27 10:53       ` [DISCUSSION] The meaning of :cmdline header argument across babel backends Max Nikulin
2024-04-29 13:33         ` Ihor Radchenko
2024-05-01 17:48           ` Matt
2024-05-01 18:01             ` Ihor Radchenko
2024-05-02 18:50               ` Matt
2024-05-03 12:12                 ` Ihor Radchenko
2024-05-20 18:01                   ` Matt
2024-05-21 10:28                     ` Max Nikulin
2024-05-21 11:34                       ` Ihor Radchenko [this message]
2024-04-26 13:12     ` [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline Ihor Radchenko
2024-04-27  7:43       ` Matt
2024-04-27  7:48         ` Ihor Radchenko

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=874jarjt53.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@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).