Max Nikulin <maniku...@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>