Noufal Ibrahim <nou...@nibrahim.net.in> wrote: > Hi Nick, > > Nick Dokos wrote: > [..] > > > > Can you run org-update-all-dblocks by hand before doing the export? > > That's possible. What I do now is to to add the > org-update-all-dbblocks to write-file-hooks as suggested by the info > pages. > > This works for me but there are times when I export directly without > saving and I'd like the block to get updated then too. > > > If so, you can even automate the process by advising > > org-export, so that org-update-all-dblocks is run before org-export > > proper is called. [1] > > This sounds better. I shall try this. Although I'm wondering if there > isn't a hook that I can add a function to manage what I want. >
Maybe this will work: the current buffer-file-name is saved in org-export-as-html (and I assume in the other export routines) in a dynamically scoped variable called org-current-export-file. The value of that variable should be available in the hook as well. So instead of (buffer-file-name), you probably want to say (or (buffer-file-name) org-current-export-file) That way, your updater can be called both from inside and outside the export functions. HTH, Nick _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode