> report_2019.org:
>
> #+TITLE: Report 2019
> #+property: header-args :var year=2019
>
> #+INCLUDE: "template.org" :lines "2-"
>
> template.org:
>
> #+TITLE: Report
>
> * My headline
>
> #+begin_src emacs-lisp :exports both :results value :eval yes
> year
> #+end_src
>
> #+BEGIN_SRC bash
> .
reza writes:
>> It works, but Org does not include variable assignments to exported code
>> by default. See org-babel-exp-code-template. The assignment would be
>> done if you execute the blocks though.
>
> So I have to set this variable to true?
Check out the docstring.
v org-babel-exp-code-te
reza writes:
> Hi Ihor
>
> Thanks for your quick reply
>
>> What you can do instead is creating a named Org paragraph with macro,
>> like
>>
>> #+name: year
>> {{{year}}}
>
> I tried this approach but it does not seem to work either:
>
> "template.org":
>
>#+TITLE: Report
>#+NAME: year
>
> It works, but Org does not include variable assignments to exported code
> by default. See org-babel-exp-code-template. The assignment would be
> done if you execute the blocks though.
So I have to set this variable to true?
> Note that year will have a value of "2019\n" with trailing newline.
reza writes:
>> What you can do instead is creating a named Org paragraph with macro,
>> like
>>
>> #+name: year
>> {{{year}}}
>
> I tried this approach but it does not seem to work either:
It works, but Org does not include variable assignments to exported code
by default. See org-babel-exp-co
Hi Ihor
Thanks for your quick reply
> What you can do instead is creating a named Org paragraph with macro,
> like
>
> #+name: year
> {{{year}}}
I tried this approach but it does not seem to work either:
"template.org":
#+TITLE: Report
#+NAME: year
{{{year}}}
* My headline
#+
reza writes:
>#+BEGIN_SRC bash :file log_{{{year}}}.csv
> ./get_log_file --start={{{year}}}-01-01 --end={{{year}}}-12-31
>#+END_SRC
>
>#+BEGIN_SRC python
> log = pd.read_csv("log_{{{year}}}.csv")
>#END_SRC
> ...
> But that does not seem to work. It looks like the macro e
Hi List
I have the following setup:
In "template.org" is the structure of a report defined which I need to
generate for several years, e.g:
#+TITLE: Report
* My headline
#+BEGIN_SRC bash :file log_{{{year}}}.csv
./get_log_file --start={{{year}}}-01-01 --end={{{year}}}-12-31
#+