On Sun, Mar 29 2020, Berry, Charles via General discussions about
Org-mode. wrote:
What we really need is an ECM rather than snippets of code.
Yes, my apologies. It seems that having more than one `header-arg`
line doesn't work properly. The following works:
```
* Header 1
:PROPERTIES:
:header-args:python: :tangle out1.py
:header-args:python: :session py1 :results function
:END:
#+begin_src python
a=1
b=2
c=a+b
return c
#+end_src
#+RESULTS:
: 3
```
But if I swap the two `header-args` lines, tangling stops working
and at the same time evaluating the code block doesn't give any
output at all:
```
* 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:
```
With a `#+PROPERTY` line, I can't make it work at all:
```
#+PROPERTY: header-args:python :tangle out.py
#+PROPERTY: header-args:python :results function
* Header 1
#+begin_src python
a=1
b=2
c=a+b
return c
#+end_src
#+RESULTS:
: 3
```
Evaluating the code block works, but tangling doesn't. Reversing
the order of the `#+PROPERTY` lines has no effect in this case.
Looks like a bug, right?
--
Joost Kremers
Life has its moments