From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: HTML export: no date in postamble unless set manually Date: Mon, 25 Feb 2013 15:59:39 -0500 Message-ID: <6350.1361825979@alphaville> References: <5710.1361823029@alphaville> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA59C-0006ck-SI for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 15:59:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA59B-0000km-AZ for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 15:59:42 -0500 Received: from g6t0186.atlanta.hp.com ([15.193.32.63]:7979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA59B-0000kV-4k for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 15:59:41 -0500 In-Reply-To: Message from Nick Dokos of "Mon, 25 Feb 2013 15:10:29 EST." <5710.1361823029@alphaville> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: Richard Stanton , "emacs-orgmode@gnu.org" Nick Dokos wrote: > Richard Stanton 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