emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [DISCUSSION] The meaning of :cmdline header argument across babel ba


From: Matt
Subject: Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends
Date: Wed, 01 May 2024 19:48:21 +0200
User-agent: Zoho Mail

 ---- On Sat, 27 Apr 2024 12:53:25 +0200  Max Nikulin  wrote --- 
 > On 26/04/2024 20:09, Ihor Radchenko wrote:
 > > Max Nikulin writes:
 > > 
 > >> However looking wider, I do not like that :cmdline for ob-shell has
 > >> different meaning than for other languages, see e.g. ob-sql. Only for
 > >> shell this parameter is treated as arguments of a *script*. In other
 > >> cases :cmdline is used to specify arguments of *interpreter* and I think
 > >> ob-shell should follow this convention.
 > > 
 > > Alas, we already have the current state of affairs documented in
 > > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html#orge70bc7b
 > > 
 > > So, no breaking changes.

Both points are valid.

I disagree with one aspect: we shouldn't use Worg as a source of truth.  The 
argument holds based on historical behavior of :cmdline.  AFAIU, Worg is a wiki 
which is open, more or less, to anyone.  Worg contents, AFAIU, have not always 
undergone review.  The manual should be the final authority.  Fortunately, 
there's nothing in the manual about :cmdline.

 ---- On Mon, 29 Apr 2024 15:33:38 +0200  Ihor Radchenko  wrote --- 

 > I like :script-args.

+ 1

 > The counterpart should then be :interpreter-args?

Are we thinking of implementing these for other languages, beyond ob-shell?  If 
not, I believe we should consider it.   That may be a path to resolve the 
issues of consistency and backwards compatibility.

If we're looking at these as general headers, then I don't think "arg" is the 
correct term here since a switch may not take a value.   For example, the "-r" 
option for Bash (IIUC).

Quick name ideas that aren't good yet may inspire better ones by inspiring 
disgust--:switches, :flags, :options, (using an "i" prefix for "interpreter") 
:iswitches, :iflags, :ioptions

--
Matt Trzcinski
Emacs Org contributor (ob-shell)
Learn more about Org mode at https://orgmode.org
Support Org development at https://liberapay.com/org-mode





reply via email to

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