emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
Cc: Richard Stanton <stanton@haas.berkeley.edu>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: HTML export: no date in postamble unless set manually
Date: Mon, 25 Feb 2013 15:59:39 -0500	[thread overview]
Message-ID: <6350.1361825979@alphaville> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Mon, 25 Feb 2013 15:10:29 EST." <5710.1361823029@alphaville>

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Richard Stanton <stanton@haas.berkeley.edu> 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	other threads:[~2013-02-25 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.115.1361811618.4057.emacs-orgmode@gnu.org>
2013-02-25 17:55 ` New HTML exporter: Oddities with figure placement Richard Stanton
2013-02-25 22:17   ` Stefan Vollmar
2013-02-25 23:14     ` Nicolas Goaziou
2013-02-26  0:05       ` Stefan Vollmar
2013-02-25 18:03 ` HTML export: no date in postamble unless set manually Richard Stanton
2013-02-25 20:10   ` Nick Dokos
2013-02-25 20:59     ` Nick Dokos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6350.1361825979@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=stanton@haas.berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).