30 Dec 05:22
Hook request and patch
From: Tom Breton (Tehom <tehom <at> panix.com>
Subject: Hook request and patch
Newsgroups: gmane.emacs.orgmode
Date: 2008-12-30 04:22:32 GMT
Subject: Hook request and patch
Newsgroups: gmane.emacs.orgmode
Date: 2008-12-30 04:22:32 GMT
Motivating incident: I was exporting some files and I wanted to
process a file after I included it. Using "#+INCLUDE" I could include
it and I could tell it to use "BEGIN_XXX" "END_XXX" so my code could
find it.
But I couldn't process it, because org-export-preprocess-string calls
`org-export-preprocess-hook' before it handles "#+INCLUDE".
I didn't want to move org-export-preprocess-hook because for all I
know there's a good reason it comes first. Similarly for the timing
of "#+INCLUDE".
So I ask for a hook that is called after includes are handled. Diffs
appended.
Another advantage: `org-update-all-dblocks' didn't seem to work in
org-export-preprocess-hook because the working buffer isn't yet in
org-mode when it's called, but works in the new hook.
Tom Breton (Tehom)
*** old-org-exp.el 2008-12-18 18:26:05.000000000 -0500
--- org-exp.el 2008-12-29 23:10:46.000000000 -0500
***************
*** 297,302 ****
--- 297,305 ----
(defvar org-export-preprocess-hook nil
"Hook for preprocessing an export buffer.
Pretty much the first thing when exporting is running this hook.")
+ (defvar org-export-midprocess-hook nil
(Continue reading)
RSS Feed