[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sharing variables between source blocks without session
From: |
Loris Bennett |
Subject: |
Re: Sharing variables between source blocks without session |
Date: |
Thu, 18 Mar 2021 14:21:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> On Tuesday, 16 Mar 2021 at 09:56, Loris Bennett wrote:
>> How can I avoid having to declare the variable 'user' for both blocks?
>
> I imagine you could use a property, as in
>
> #+property: header-args :var user=loris
>
> or even make it specific for the particular language.
>
> (untested)
Thanks for point out using 'header-args;' as property. However, if I do
the following, the variable is unset in the shell script:
#+properties: header-args :var user=loris
#+begin_src sh
echo user: ${user}
#+end_src
#+RESULTS:
: user:
Is that supposed to work, or am I doing something wrong?
Cheers,
Loris
--
This signature is currently under construction.
- Sharing variables between source blocks without session, Loris Bennett, 2021/03/16
- Re: Sharing variables between source blocks without session, Loris Bennett, 2021/03/16
- Re: Sharing variables between source blocks without session, Eric S Fraga, 2021/03/16
- Re: Sharing variables between source blocks without session,
Loris Bennett <=
- RE: Sharing variables between source blocks without session, Cook, Malcolm, 2021/03/18
- Re: Sharing variables between source blocks without session, Loris Bennett, 2021/03/19
- Re: Sharing variables between source blocks without session, Loris Bennett, 2021/03/19
- Re: Sharing variables between source blocks without session, Eric S Fraga, 2021/03/19
- Re: Sharing variables between source blocks without session, Loris Bennett, 2021/03/19
- Re: Sharing variables between source blocks without session, Eric S Fraga, 2021/03/19
- Re: Sharing variables between source blocks without session, Loris Bennett, 2021/03/22