emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Quoting of noweb references and variable noweb function argument


From: Ihor Radchenko
Subject: Re: [O] Quoting of noweb references and variable noweb function arguments
Date: Wed, 19 Oct 2022 09:04:12 +0000

Cody Goodman <codygman.consulting@gmail.com> writes:

> I'm having an issue with quoting noweb functions. Since quote is used to
> signify a variable being passed into the noweb syntax function call I
> cannot put a quote around theno web function call and end up with invalid
> bash.
>    #+begin_src sh :noweb yes :var logValUserVar="user2"
> logValUserPass="pass2" jqExpr="[]keys"
>    json=<<get-login-json-mock(user="$logValUserVar",pass="$logValPassVar")>>
>    echo $json | jq $jqExpr
>    #+end_src

You cannot pass src block variables to noweb. It is currently not supported.

And you cannot pass bash bindings to noweb. Noweb expansion happens
before executing the bash code. It is not possible to know that bash
assignments at that point.

-- 
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 via email to

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