emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Inconsistent {{{time}}} org macro expansion


From: Nicolas Goaziou
Subject: Re: [O] Inconsistent {{{time}}} org macro expansion
Date: Fri, 29 Jan 2016 00:54:58 +0100

Hello,

Kaushal Modi <address@hidden> writes:

> 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?

It was. It is now fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



reply via email to

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