[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] #+INCLUDE: file in code block results does not work?
From: |
Nicolas Goaziou |
Subject: |
Re: [O] #+INCLUDE: file in code block results does not work? |
Date: |
Wed, 26 Mar 2014 10:35:14 +0100 |
Hello,
KDr2 <address@hidden> writes:
> I wrote a piece of code like below:
>
> #+NAME: inc-file
> #+BEGIN_SRC elisp :results value raw :exports results :var file="
> common.inc.org"
> (concat "#+INCLUDE: /path/to/include-dir/" file) ;; path is cal-ed from
> path of current-buffer file
> #+END_SRC
>
> #+CALL: inc-file(file="a.org") :results raw
>
> but this does not work, anyone knows why?
During export process, INCLUDE keywords are expanded before Babel code
is executed.
You can use a macro here:
#+MACRO: inc-file #+INCLUDE: /path/to-include-dir/$1
{{{inc-file(a.org)}}}
Regards,
--
Nicolas Goaziou