|
From: | KDr2 |
Subject: | Re: [O] #+INCLUDE: file in code block results does not work? |
Date: | Wed, 26 Mar 2014 22:38:36 +0800 |
Hello,
Thank you for sharing.
KDr2 <address@hidden> writes:
> I wrote a blog entry to describe all the dynamic tricks I used in the
> exporting:
>
> http://kdr2.com/tech/emacs/orgmode-export-process.html
For completeness, there is another step involved in the process before
switching to back-ends: run functions in
`org-export-before-parsing-hook'.
Also, you can also a function in the same hook that would update
>> I use dynamic block now, by adding `org-update-all-dblocks' to
>> `org-export-before-processing-hook'.
a generic "inc-file" macro in the file:
(lambda (backend)
(org-with-wide-buffer
(goto-char (point-min))
(let ((case-fold-search nil))
(while (re-search-forward "^ *#\\+MACRO: +inc-file +\"\\(PATH\\)" nil t)
(replace-match (get-path-dynamically) t nil nil 1)))))
with the following generic macro:
#+MACRO: inc-file "PATH$1"
Regards,
--
Nicolas Goaziou
[Prev in Thread] | Current Thread | [Next in Thread] |