emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Name of file being exported.


From: Nick Dokos
Subject: Re: [Orgmode] Name of file being exported.
Date: Tue, 14 Apr 2009 14:26:50 -0400

Noufal Ibrahim <address@hidden> 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





reply via email to

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