emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] HTML export: no date in postamble unless set manually


From: Nick Dokos
Subject: Re: [O] HTML export: no date in postamble unless set manually
Date: Mon, 25 Feb 2013 15:59:39 -0500

Nick Dokos <address@hidden> wrote:

> Richard Stanton <address@hidden> wrote:
> 
> > I have  org-export-html-postamble set to t. When I export a simple org
> > file that has no explicit #+date line (using the new exporter), I get a
> > line that says "Date:" at the bottom of the resulting HTML file, but
> > there's no date listed next to it. If I add an explicit #+date line, it is
> > correctly transferred to the bottom of the HTML file, but wouldn't it make
> > sense to have today's date listed if no explicit alternative is provided?
> > At any rate, adding a line that says "Date:" with nothing after the colon
> > doesn't seem like the optimal default setting.
> > 
> 
> The backend-specific variables have been renamed in the new exporter: try
> org-html-postamble. Check the FAQ:
> 
> http://orgmode.org/worg/org-faq.html#new-exporter-switch
> 
> for more details.
> 

OK, now that I've tried it a bit, I can see that the variable name is
not the reason: I can reproduce the empty date after setting
org-html-postamble to t.  The code looks like this
(ox-html.el:org-html--build-postamble):

,----
|              (let ((date (if (not (plist-get info :with-date)) ""
|                            (org-export-data (plist-get info :date) info)))
`----

:with-date (i.e. org-export-with-date) is set to t but there is no
default for an absent :date.

This is probably another case of too many cooks (or variables in this
case: org-export-with-date, org-html-postamble-format, and the :date
entry in the plist have to cooperate in order to produce the desired
result), so the behavior is difficult to explain and it's not clear that
all the different combinations make sense - e.g. if org-export-with-date
is nil, but the format includes a %d, we probably should not have an
empty date field, whereas if org-export-with-date is t but there is no
date supplied, it should probably default to today.

Apologies for rushing to judgment.

Nick





reply via email to

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