Re: Sharing variables between source blocks without session

2021-03-22 Thread Loris Bennett
Eric S Fraga writes: > On Friday, 19 Mar 2021 at 14:59, Loris Bennett wrote: >> To be honest, I find it is a wee bit confusing that it's >> >> #+PROPERTY: header-args:sh :var user="loris" >> >> *without* a colon after the language (if I add it, there is not error, >> but the variable is just no

Re: Sharing variables between source blocks without session

2021-03-19 Thread Eric S Fraga
On Friday, 19 Mar 2021 at 14:59, Loris Bennett wrote: > To be honest, I find it is a wee bit confusing that it's > > #+PROPERTY: header-args:sh :var user="loris" > > *without* a colon after the language (if I add it, there is not error, > but the variable is just not set) but > > :PROPERTIES: >

Re: Sharing variables between source blocks without session

2021-03-19 Thread Loris Bennett
Eric S Fraga writes: > On Friday, 19 Mar 2021 at 07:38, Loris Bennett wrote: >> However, the restriction to source blocks of a particular language does >> not seem to work like this, but maybe I have got the syntax wrong >> (again). > > Maybe ;-) > > This seems to work for me for a shell: > > :PR

Re: Sharing variables between source blocks without session

2021-03-19 Thread Eric S Fraga
On Friday, 19 Mar 2021 at 07:38, Loris Bennett wrote: > However, the restriction to source blocks of a particular language does > not seem to work like this, but maybe I have got the syntax wrong > (again). Maybe ;-) This seems to work for me for a shell: :PROPERTIES: :header-args:sh: :var user=

Re: Sharing variables between source blocks without session

2021-03-19 Thread Loris Bennett
Loris Bennett writes: > "Cook, Malcolm" writes: > >> Eric S Fraga 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 >>

Re: Sharing variables between source blocks without session

2021-03-18 Thread Loris Bennett
Eric S Fraga 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 p

Re: Sharing variables between source blocks without session

2021-03-18 Thread Loris Bennett
"Cook, Malcolm" writes: > Eric S Fraga 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 :va

RE: Sharing variables between source blocks without session

2021-03-18 Thread Cook, Malcolm
Eric S Fraga 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

Re: Sharing variables between source blocks without session

2021-03-18 Thread Eric S Fraga
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 #+ me

Re: Sharing variables between source blocks without session

2021-03-18 Thread Loris Bennett
Eric S Fraga 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 languag

Re: Sharing variables between source blocks without session

2021-03-16 Thread Eric S Fraga
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) -- : Eric S Fraga v

Re: Sharing variables between source blocks without session

2021-03-16 Thread Loris Bennett
"Loris Bennett" writes: > Hi, > > I have a 'sh' source block which produces a table which I then want to > plot with a 'python' source block: > > #+NAME: code;raw_data > #+HEADER: :var user="loris" > > #+BEGIN_SRC sh > ps -u loris -o etimes= > #+END_SRC Oops, that should be #+NAME: code;raw_