emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] #+INCLUDE: file in code block results does not work?


From: KDr2
Subject: Re: [O] #+INCLUDE: file in code block results does not work?
Date: Wed, 26 Mar 2014 22:38:36 +0800

Oh, I'll star this mail, and add it to my post later, thanks again :)


On Wed, Mar 26, 2014 at 10:31 PM, Nicolas Goaziou <address@hidden> wrote:
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



--
-- 

KDr2, http://kdr2.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]