Hello,

KDr2 <killy.d...@gmail.com> 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

Reply via email to