emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pavel Panchekha <me@pavpanchekha.com>
To: emacs-orgmode@gnu.org
Subject: Re: Formatting dates in org-html postamble
Date: Sat, 19 Nov 2016 10:09:43 -0800	[thread overview]
Message-ID: <CAE4=OQ-meFzipTE=Jq2KiS7EBf72Jbr=UwTRCEb9w6KdOeOgBA@mail.gmail.com> (raw)
In-Reply-To: <87mvgvlspd.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]

I'm sorry, let me give a full bug report:

I have

#+TITLE: title here
>
#+DATE: <2016-10-20>
>

in an org file, with no other "#+" lines set.

In my configuration file, I have set

(setf org-html-postamble-format
>       (list
>        (list
>         "en"
>          "<p>By <a href='https://pavpanchekha.com' rel='author'>%a</a> on
> <time>%d</time>.\n")))
>
(setf org-html-metadata-timestamp-format "%d %B %Y")
>

When I publish to HTML, the date is printed directly as "<2016-10-20 Thu>".

I am using Emacs 25.1.1 and Org 9.0.1.

I have looked through the code, and think the error is likely on line 1882
of ox-html.el, where the date format ought to be passed to
org-export-get-date as the optional second argument.

As a workaround, I am currently setting org-export-date-timestamp-format,
but it seems like this ought to be HTML-specific.

—Pavel Panchekha

On Sat, Nov 19, 2016 at 1:33 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Pavel Panchekha <me@pavpanchekha.com> writes:
>
> > I've been trying to set the date format in the HTML postamble. It looks
> > like a date given in #+DATE is not being formatted according to the date
> > format specification, but if no #+DATE is given, the format specification
> > is used.
> >
> > Is this intended behavior—should I write formatted dates in #+DATE?
>
> We need more information to answer this.
>
> What exactly did you try (configured variables, #+DATE keyword ...)?
> What Org version are you using? What did you expect?
>
> If you have some spare time,
> <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html> may be a good
> read.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 3475 bytes --]

  reply	other threads:[~2016-11-19 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-19  8:45 Formatting dates in org-html postamble Pavel Panchekha
2016-11-19  9:33 ` Nicolas Goaziou
2016-11-19 18:09   ` Pavel Panchekha [this message]
2016-11-19 22:19     ` Nicolas Goaziou

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='CAE4=OQ-meFzipTE=Jq2KiS7EBf72Jbr=UwTRCEb9w6KdOeOgBA@mail.gmail.com' \
    --to=me@pavpanchekha.com \
    --cc=emacs-orgmode@gnu.org \
    /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).