* Formatting dates in org-html postamble
@ 2016-11-19 8:45 Pavel Panchekha
2016-11-19 9:33 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Panchekha @ 2016-11-19 8:45 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
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?
—Pavel Panchekha
[-- Attachment #2: Type: text/html, Size: 642 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Formatting dates in org-html postamble
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
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2016-11-19 9:33 UTC (permalink / raw)
To: Pavel Panchekha; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Formatting dates in org-html postamble
2016-11-19 9:33 ` Nicolas Goaziou
@ 2016-11-19 18:09 ` Pavel Panchekha
2016-11-19 22:19 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Panchekha @ 2016-11-19 18:09 UTC (permalink / raw)
To: emacs-orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Formatting dates in org-html postamble
2016-11-19 18:09 ` Pavel Panchekha
@ 2016-11-19 22:19 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2016-11-19 22:19 UTC (permalink / raw)
To: Pavel Panchekha; +Cc: emacs-orgmode
Hello,
Pavel Panchekha <me@pavpanchekha.com> writes:
> 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.
Fixed. Thank you for the report and the analysis.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-19 22:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-11-19 22:19 ` Nicolas Goaziou
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).