Yes I'm sure. From the link Thomas sent,

Any property specification, unless it is postfixed with a `+`, will *reset*
the value of that property to its current value.

C-c C-v <TAB> (for me, Charles uses C-c C-v C-i) withitn a code block shows
you the header args that are set for that block. Useful for debugging.

  -k.

On Mon, Mar 30, 2020 at 3:24 PM Joost Kremers <joostkrem...@fastmail.fm>
wrote:

>
> On Mon, Mar 30 2020, Ken Mankoff wrote:
> > Header args overwrite. Change python to python+ to append header
> > args.
>
> Are you sure? That's not documented anywhere I can find and it
> seems to be belied by the fact that if I put the headers in the
> order:
>
> ```
> :PROPERTIES:
> :header-args:python: :tangle out1.py
> :header-args:python: :session py1 :results function
> :END:
> ```
>
> everything works as I would expect (the code blocks are tangled to
> a file `out1.py` *and* they are evaluated in a python session
> `py1`), meaning that *all* header args are picked up.
>
> If I reverse the order and add a `+` sign, like so:
>
> ```
> :PROPERTIES:
> :header-args:python+: :session py1 :results function
> :header-args:python+: :tangle out1.py
> :END:
> ```
>
> the code does indeed get tangled, but the `:results` header arg
> isn't picked up, because the code block doesn't produce any
> output.
>
> For reference, this is my test file:
>
> ```
> * Header 1
> :PROPERTIES:
> :header-args:python+: :session py1 :results function
> :header-args:python+: :tangle out1.py
> :END:
>
> #+begin_src python
> a=1
> b=2
> c=a+b
> return c
> #+end_src
>
> #+RESULTS:
> ```
>
>
> --
> Joost Kremers
> Life has its moments
>

Reply via email to