[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: |
Fri, 19 Mar 2021 07:50:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> On Thursday, 18 Mar 2021 at 14:21, Loris Bennett wrote:
>> Thanks for point out using 'header-args;' as property. However, if I do
>> the following, the variable is unset in the shell script:
>
> Works for me.
>
> Make sure you reload properties by hitting C-c C-c on the property line
> (or some other #+ meta line in the file). Also, you will need to put
> the value of the user variable in "quotes", i.e. user="loris", for some
> reason.
OK, works for me, too now. The quotes were the important thing, thanks.
For future me and the future in general, would it be a good idea to add
an example to
https://orgmode.org/manual/Using-Header-Arguments.html
which illustrates the difference between strings and numbers,
e.g.
#+property: header-args:sh :var user="loris" fails=3 temp=17.1
#+begin_src sh
echo user ${user}
echo fails ${fails}
echo temp ${temp}
#+end_src
#+RESULTS:
| user | loris |
| fails | 3 |
| temp | 17.1 |
?
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, 2021/03/18
- 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