emacs-orgmode
[Top][All Lists]
Advanced

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

Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERT


From: Joost Kremers
Subject: Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block
Date: Tue, 31 Mar 2020 00:23:53 +0200
User-agent: mu4e 1.3.10; emacs 26.3


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

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