[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot expand macros through included org file
From: |
reza |
Subject: |
Re: Cannot expand macros through included org file |
Date: |
Fri, 17 Feb 2023 13:05:45 +0000 |
> 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
> ./get_log_file --start=$year-01-01 --end=$year-12-31
> #+END_SRC
>
> #+BEGIN_SRC python
> log = pd.read_csv(f"log_{year}.csv")
> #+END_SRC
Thank you, I got it to work by only using
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 bash
./get_log_file --start=$year-01-01 --end=$year-12-31
#+END_SRC
#+BEGIN_SRC python
log = pd.read_csv(f"log_{year}.csv")
#+END_SRC
OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys
OpenPGP_signature
Description: PGP signature