emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-export-html-date-format-string
@ 2013-05-21 17:49 Scott Randby
  2013-05-21 18:51 ` org-export-html-date-format-string Scott Randby
  2013-05-21 18:55 ` org-export-html-date-format-string Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Scott Randby @ 2013-05-21 17:49 UTC (permalink / raw)
  To: emacs-orgmode

I'm having trouble customizing the variable
org-export-html-date-format-string. Before I tried to customize it, I
would get the date in the postamble when I exported to html:

  <p class="date">Created: 2013-05-21 Tue 12:44</p>

The original string for the variable is: %Y-%m-%dT%R%z

I don't want this string, so I changed it to %F%T%Z which didn't give
any date when I exported. So I changed the string to %Y-%m-%d and still
had no date after export. Changing back to the default string doesn't
work either.

This seems like a bug. Here is what is in my init.el after customization:

 '(org-export-html-date-format-string "%Y-%m-%dT%R%z")

 '(org-html-postamble t)

 '(org-html-postamble-format (quote (("en" "<p class=\"author\">Author:
%a </p> <p class=\"date\">Date: %d</p> <p class=\"creator\">%c</p>"))))

Here is the html of the postamble after export:

  <div id="postamble" class="status">
  <p class="author">Author: Scott P. Randby </p>
  <p class="date">Date: </p>
  <p class="creator"><a
  href="http://www.gnu.org/software/emacs/">Emacs</a> 24.2.1 (<a
  href="http://orgmode.org">Org</a> mode 8.0.3)</p>
  </div>

How do I get the date variable to work?

Scott Randby

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-export-html-date-format-string
  2013-05-21 17:49 org-export-html-date-format-string Scott Randby
@ 2013-05-21 18:51 ` Scott Randby
  2013-05-21 18:55 ` org-export-html-date-format-string Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Scott Randby @ 2013-05-21 18:51 UTC (permalink / raw)
  To: emacs-orgmode

I solved the problem by putting the following in the file to be exported:

#+DATE: [2013-05-21 Tue 14:45]

However, this means I have to remember to change the date every time I
export. Is there an easier way to do this?

Scott Randby

On 05/21/2013 01:49 PM, Scott Randby wrote:
> I'm having trouble customizing the variable
> org-export-html-date-format-string. Before I tried to customize it, I
> would get the date in the postamble when I exported to html:
> 
>   <p class="date">Created: 2013-05-21 Tue 12:44</p>
> 
> The original string for the variable is: %Y-%m-%dT%R%z
> 
> I don't want this string, so I changed it to %F%T%Z which didn't give
> any date when I exported. So I changed the string to %Y-%m-%d and still
> had no date after export. Changing back to the default string doesn't
> work either.
> 
> This seems like a bug. Here is what is in my init.el after customization:
> 
>  '(org-export-html-date-format-string "%Y-%m-%dT%R%z")
> 
>  '(org-html-postamble t)
> 
>  '(org-html-postamble-format (quote (("en" "<p class=\"author\">Author:
> %a </p> <p class=\"date\">Date: %d</p> <p class=\"creator\">%c</p>"))))
> 
> Here is the html of the postamble after export:
> 
>   <div id="postamble" class="status">
>   <p class="author">Author: Scott P. Randby </p>
>   <p class="date">Date: </p>
>   <p class="creator"><a
>   href="http://www.gnu.org/software/emacs/">Emacs</a> 24.2.1 (<a
>   href="http://orgmode.org">Org</a> mode 8.0.3)</p>
>   </div>
> 
> How do I get the date variable to work?
> 
> Scott Randby
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-export-html-date-format-string
  2013-05-21 17:49 org-export-html-date-format-string Scott Randby
  2013-05-21 18:51 ` org-export-html-date-format-string Scott Randby
@ 2013-05-21 18:55 ` Nicolas Goaziou
  2013-05-21 19:36   ` org-export-html-date-format-string Scott Randby
  1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2013-05-21 18:55 UTC (permalink / raw)
  To: Scott Randby; +Cc: emacs-orgmode

Hello,

Scott Randby <srandby@gmail.com> writes:

> I'm having trouble customizing the variable
> org-export-html-date-format-string.

Use `org-html-metadata-timestamp-format' instead.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-export-html-date-format-string
  2013-05-21 18:55 ` org-export-html-date-format-string Nicolas Goaziou
@ 2013-05-21 19:36   ` Scott Randby
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Randby @ 2013-05-21 19:36 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 05/21/2013 02:55 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Scott Randby <srandby@gmail.com> writes:
> 
>> I'm having trouble customizing the variable
>> org-export-html-date-format-string.
> 
> Use `org-html-metadata-timestamp-format' instead.

Thanks. This worked after I replaced %d with %T in the format string for
org-html-postamble-format.

> 
> 
> Regards,
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-21 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 17:49 org-export-html-date-format-string Scott Randby
2013-05-21 18:51 ` org-export-html-date-format-string Scott Randby
2013-05-21 18:55 ` org-export-html-date-format-string Nicolas Goaziou
2013-05-21 19:36   ` org-export-html-date-format-string Scott Randby

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).