emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] :EXPORT_FILE_NAME: containing a date-stamp


From: Berry, Charles
Subject: Re: [O] :EXPORT_FILE_NAME: containing a date-stamp
Date: Wed, 7 Feb 2018 18:06:20 +0000


> On Feb 7, 2018, at 9:37 AM, Kaushal Modi <address@hidden> wrote:
> 
> On Wed, Feb 7, 2018 at 12:22 PM Berry, Charles <address@hidden> wrote:
> Use an `eval' macro.
> 
> In a more recent version than you use, this works:
> 
> * abc
>   :PROPERTIES:
>   :EXPORT_TITLE: {{{etitle(my title)}}}
>   :END:
> 
> #+macro: etitle (eval (concat (format-time-string "%Y-%m-%d") " " $1))
> 
> That works for EXPORT_TITLE!
> 
> So I tried for EXPORT_FILE_NAME, but it doesn't work there, because 
> org-export-output-file-name should be getting called internally *before* the 
> macro expansion is done.

I missed that. 

Further, `org-export-file-name' gets called before `org-export-as' so there is 
no hope of using export hooks or filters or other gambits like that.

I don't see a clean way to do date stamp the file name without writing your own 
export-to-file function that handles date-stamping the file arg sent to 
`org-export-to-file' or replacing/advicing `org-export-file-name' to do that.

Chuck



reply via email to

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