Hi,
I am getting different outputs from org-export-get-date depending on whether I export the full org file or just a selected heading. For #+DATE, I am using a {{{time}}} macro.
Here's a test org file:
=====
#+DATE: {{{time(%b %e %Y\, %a)}}}
* Heading 1
Content 1
* Heading 2
Content 2
=====
And here is a test org-html-postamble function to help debug this:
=====
(defun my/org-html-postamble-fn (info)
(let ((date (car (org-export-get-date info))))
(message "Date: %S" date)))
(setq org-html-postamble #'my/org-html-postamble-fn)
=====
SCENARIO 1: Normal export [GOOD]
In this scenario, I export the full org file to html (C-c C-e h h) without selecting anything.
This is the output I get in *Messages*
Date: #("Jan 28 2016, Thu" 0 16 (:parent (#0)))
I get a date I case use in the postamble output.
SCENARIO 2: Export only one of the headings. [BAD]
Now select just the "Heading 1" sub-tree and then do C-c C-e h h.
This time, the output is:
Date: (macro (:key "time" :value "{{{time(%b %e %Y\\, %a)}}}" :args ("%b %e %Y, %a") :begin 1 :end 26 :post-blank 0 :parent (#0)))
So it looks like the time macro did not expand.
Why is that? Is it a bug?
This is my org version: Org-mode version 8.3.3 (release_8.3.3-509-gc17fcc @ /home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)
Thanks.
Kaushal Modi