Göktuğ Kayaalp <s...@gkayaalp.com> writes:

> Hello,
>
> Thanks  for your  response.  As  you suggest,  I switched  to using  the
> EXPORT_DATE property.  It works as expected.
>
> Now a little problem  that I have is that I  cannot have timestamps like
> «10 September 2015» in my exports, but a literal inactive timestamp.

> This is because in  the related capture template, I have  to use `%u' to
> add a timestamp, which adds an inactive timestamp, reusing the date that
> I entered into  the datetree prompt.  There is the  %<...> directive for
> the capture  templates which allows  me to put in  a time format,  as in
> `format-time-string',  but it  gets its  value from  `current-time', not
> from the date  of the datetree prompt.  Now  I do not know if  this is a
> feature or  a bug, but if  I want to  copy over lecture notes  from some
> time ago, it's a problem.

Perhaps someone can suggest a better method, but what about adding an
export filter that formats inactive timestamps the way you want?
Something like

    (setq org-latex-inactive-timestamp-format "%s")
    
    (defun u/format-inactive-timestamp (text backend info)
      (when (org-export-derived-backend-p backend 'latex)
        (format-time-string
         "%D" (apply #'encode-time (org-parse-time-string text)))))
    
    (add-to-list 'org-export-filter-timestamp-functions
                 'u/format-inactive-timestamp)

--
Kyle

Reply via email to