From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal 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 Message-ID: References: <86egjg3wx8.fsf@example.com> <87y4hneay5.fsf@nicolasgoaziou.fr> <20150807142030.GI28462@chitra.no-ip.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d23e0037003051cb9cc67 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNj1P-0004lh-Dc for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 10:53:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNj1N-0008F4-Tc for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 10:53:23 -0400 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:35853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNj1N-0008EZ-Jp for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 10:53:21 -0400 Received: by oiev193 with SMTP id v193so26549181oie.3 for ; Fri, 07 Aug 2015 07:53:21 -0700 (PDT) In-Reply-To: <20150807142030.GI28462@chitra.no-ip.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-org list --001a113d23e0037003051cb9cc67 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Aha.. I am using a custom postamble for html: (setq org-html-postamble t) ; default value =3D 'auto (setq org-html-postamble-format `(("en" ,(concat "Exported using " ;; "%c" is replaced with `org-html-creator-string' ;; Emacs (Org mode ) "
" "%c
" "by %e. =E2=80=94 " "
" "%d
")))) 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 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 ca= n > > 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: > >
>

Author: Suvayu Ali

>

Created: 2015-08-07 Fri 16:14

>

">Validate

> > 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. > > --001a113d23e0037003051cb9cc67 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Aha.. I am using a custom postamble for ht= ml:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq org-html-postamble t) = ; default value =3D 'auto
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq org-html-postamble-format
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 `(("en"
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0,(concat = "Exported using "
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ;; "%c" is replaced with `org-html-creator-stri= ng'
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;= ; Emacs <VERSION> (Org mode <VERSION>)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "<div style=3D\"disp= lay: inline\" class=3D\"creator\">"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "%c</div> "= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "by= %e. =E2=80=94 "
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 "<div style=3D\"display: inline\" class=3D\= "date\">"
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "%d</div>"))))

S= o it looks like "%d" returns an empty string if #+DATE: is omitte= d altogether; but if org-html-postamble is 'auto, today's date is e= ntered 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 -0= 400, 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 c= an
> also control the formatting of the date-time stamp.

I just tested it, I get the following at the end of the exported htm= l
document:

<div id=3D"postamble" class=3D"status">
<p class=3D"author">Author: Suvayu Ali</p>
<p class=3D"date">Created: 2015-08-07 Fri 16:14</p> <p class=3D"validation"><a href=3D"http://validator.w3.org/check?uri=3Dreferer">Validate</a&g= t;</p>

I don't know any html, were you expecting something else?=C2=A0 About t= he
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.


--001a113d23e0037003051cb9cc67--