[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 15:31:11 +0100 |
Hello,
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
Thank you for sharing.
For completeness, there is another step involved in the process before
switching to back-ends: run functions in
`org-export-before-parsing-hook'.
>> I use dynamic block now, by adding `org-update-all-dblocks' to
>> `org-export-before-processing-hook'.
Also, you can also a function in the same hook that would update
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