emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Re: What is the best way to set #+DATE to today's date?
Date: Fri, 7 Aug 2015 10:52:41 -0400	[thread overview]
Message-ID: <CAFyQvY2uXvA5n_MZ3uRv849nNmdAx9auur0Wr9DEx9WfxJhBQw@mail.gmail.com> (raw)
In-Reply-To: <20150807142030.GI28462@chitra.no-ip.org>

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

Aha.. I am using a custom postamble for html:

            (setq org-html-postamble t) ; default value = 'auto
            (setq org-html-postamble-format
                  `(("en"
                     ,(concat "Exported using "
                              ;; "%c" is replaced with
`org-html-creator-string'
                              ;; Emacs <VERSION> (Org mode <VERSION>)
                              "<div style=\"display: inline\"
class=\"creator\">"
                              "%c</div> "
                              "by %e. — "
                              "<div style=\"display: inline\"
class=\"date\">"
                              "%d</div>"))))

So it looks like "%d" returns an empty string if #+DATE: is omitted
altogether; but if org-html-postamble is 'auto, today's date is entered if
#+DATE: is omitted.



--
Kaushal Modi

On Fri, Aug 7, 2015 at 10:20 AM, Suvayu Ali <fatkasuvayu+linux@gmail.com>
wrote:

> On Fri, Aug 07, 2015 at 10:01:42AM -0400, Kaushal wrote:
> > @Fabrice Thanks for sharing your examples!
> >
> > @Suvayu I tried removing #+DATE: line.. but with that I don't see the
> date
> > stamp in html exports. The advantage of {{{time(FORMAT)}}} is that I can
> > also control the formatting of the date-time stamp.
>
> I just tested it, I get the following at the end of the exported html
> document:
>
> <div id="postamble" class="status">
> <p class="author">Author: Suvayu Ali</p>
> <p class="date">Created: 2015-08-07 Fri 16:14</p>
> <p class="validation"><a href="http://validator.w3.org/check?uri=referer
> ">Validate</a></p>
>
> I don't know any html, were you expecting something else?  About the
> format, take a look at org-time-stamp-custom-formats and
> org-time-stamp-formats; eventhough they are for timestamps in the
> document, maybe they honour the document creation timestamp.
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
>

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

  reply	other threads:[~2015-08-07 14:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 16:33 What is the best way to set #+DATE to today's date? Kaushal
2015-08-06 16:44 ` Rasmus
2015-08-06 17:00   ` Kaushal
2015-08-06 17:41     ` Rasmus
2015-08-06 18:18     ` John Kitchin
2015-08-06 19:25       ` Kaushal
2015-08-06 19:45         ` Kaushal
2015-08-06 19:50           ` Thomas S. Dye
2015-08-06 19:58             ` Kaushal
2015-08-06 20:51               ` [PATCH] " Thomas S. Dye
2015-08-06 21:22                 ` Kaushal
2015-08-06 21:48                   ` Thomas S. Dye
2015-08-06 21:54                     ` Fabrice Niessen
2015-08-06 22:12                       ` Thomas S. Dye
2015-08-07  8:53                         ` Nicolas Goaziou
2015-08-07 14:01                           ` Kaushal
2015-08-07 14:20                             ` Suvayu Ali
2015-08-07 14:52                               ` Kaushal [this message]
2015-08-11 18:40                           ` Thomas S. Dye
2015-08-11 22:59                             ` Nicolas Goaziou
2015-08-07  4:31     ` Suvayu Ali
2015-08-06 18:12 ` Nick Dokos

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=CAFyQvY2uXvA5n_MZ3uRv849nNmdAx9auur0Wr9DEx9WfxJhBQw@mail.gmail.com \
    --to=kaushal.modi@gmail.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).