From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haojun Bao Subject: Re: bug(?) ox-html always add a timestamp in comment which can't be customized away Date: Sat, 8 Jun 2013 22:14:07 +0800 Message-ID: References: <87ehcdkw3g.fsf@pierrot.dokosmarshall.org> <871u8dkujl.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1bc041e889004dea5291c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlJuE-0003Qc-8f for emacs-orgmode@gnu.org; Sat, 08 Jun 2013 10:14:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UlJuC-0006wx-GK for emacs-orgmode@gnu.org; Sat, 08 Jun 2013 10:14:10 -0400 Received: from mail-ob0-x22b.google.com ([2607:f8b0:4003:c01::22b]:52452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlJuC-0006ws-9b for emacs-orgmode@gnu.org; Sat, 08 Jun 2013 10:14:08 -0400 Received: by mail-ob0-f171.google.com with SMTP id dn14so8002556obc.2 for ; Sat, 08 Jun 2013 07:14:07 -0700 (PDT) In-Reply-To: <871u8dkujl.fsf@pierrot.dokosmarshall.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: Nick Dokos Cc: emacs-orgmode@gnu.org --001a11c1bc041e889004dea5291c Content-Type: text/plain; charset=UTF-8 Thanks, sorry for not checking the latest version. On Sat, Jun 8, 2013 at 2:04 PM, Nick Dokos wrote: > Haojun Bao writes: > > > Just checked, it is the same tag (release_8.0.3), there is no change > like in your code. > > > > Could you please run git blame on those lines? > > You need to upgrade to latest. Git blame says: > > ,---- > | $ git blame -L 1509,1511 lisp/ox-html.el > | d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1509) (when > (plist-get info :time-stamp-file) > | d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1510) > (format-time-string > | d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1511) (concat "\n"))) > `---- > > and the commit shows the change from the code you see to the code I see: > > ,---- > | nick@pierrot:~/src/emacs/org/org-mode$ git show d574bf52 > | commit d574bf522d1b2ac74cb4245f8742253bde7861df > | Author: Kodi Arfer > | Date: Thu May 30 15:19:57 2013 -0400 > | > | ox-html: Fix handling of time-stamp-file > | > | * lisp/ox-html.el (org-html--build-meta-info): Insert no timestamp > | when :time-stamp-file is nil. > | > | TINYCHANGE > | > | diff --git a/lisp/ox-html.el b/lisp/ox-html.el > | index 297cb55..949c3ba 100644 > | --- a/lisp/ox-html.el > | +++ b/lisp/ox-html.el > | @@ -1506,10 +1506,9 @@ INFO is a plist used as a communication channel." > | "iso-8859-1"))) > | (concat > | (format "%s\n" title) > | - (format > | - (when :time-stamp-file > | - (format-time-string > | - (concat "\n")))) > | + (when (plist-get info :time-stamp-file) > | + (format-time-string > | + (concat "\n"))) > | (format > | (if (org-html-html5-p info) > | (org-html-close-tag "meta" " charset=\"%s\"" info) > `---- > > Nick > > > > > On Sat, Jun 8, 2013 at 1:30 PM, Nick Dokos wrote: > > > > Haojun Bao writes: > > > > > The culprit code is the following: > > > > > > (when :time-stamp-file > > > (format-time-string > > > (concat "\n"))) > > > > > > This `when' condition is always true, because :time-stamp-file is a > > > keyword and always eval to itself, never to nil. > > > > > > So I think org-export-time-stamp-file should be used instead of > > > :time-stamp-file. > > > > > > > What version are you using? In the version I have, the code looks > like > > this: > > > > (when (plist-get info :time-stamp-file) > > (format-time-string > > (concat "\n"))) > > > > Org-mode version 8.0.3 (release_8.0.3-197-g221768) > > [nb: this version includes a few local commits (irrelevant to this > subject)] > > -- > > Nick > > > > -- > Nick > > > --001a11c1bc041e889004dea5291c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks, sorry for not checking the latest version.


On Sat, Jun 8, 2013 at 2:04 PM, Nick Dokos <ndokos@gmail.com> wrote:
Haojun Bao <baohaojun@gmail.com> writes:

> Just checked, it is the same tag (release_8.0.3), there is no change l= ike in your code.
>
> Could you please run git blame on those lines?

You need to upgrade to latest. Git blame says:

,----
| $ git blame -L 1509,1511 lisp/ox-html.el
| d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1509) =C2=A0 =C2=A0 =C2=A0= (when (plist-get info :time-stamp-file)
| d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1510) =C2=A0 =C2=A0 =C2=A0= =C2=A0(format-time-string
| d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1511) =C2=A0 (concat "= ;<!-- " org-html-metadata-timestamp-format " -->\n")))=
`----

and the commit shows the change from the code you see to the code I see:
,----
| nick@pierrot:~/src/emacs/org/org-mode$ git show d574bf52
| commit d574bf522d1b2ac74cb4245f8742253bde7861df
| Author: Kodi Arfer <git@arfer.net= >
| Date: =C2=A0 Thu May 30 15:19:57 2013 -0400
|
| =C2=A0 =C2=A0 ox-html: Fix handling of time-stamp-file
|
| =C2=A0 =C2=A0 * lisp/ox-html.el (org-html--build-meta-info): Insert no ti= mestamp
| =C2=A0 =C2=A0 =C2=A0 when :time-stamp-file is nil.
|
| =C2=A0 =C2=A0 TINYCHANGE
|
| diff --git a/lisp/ox-html.el b/lisp/ox-html.el
| index 297cb55..949c3ba 100644
| --- a/lisp/ox-html.el
| +++ b/lisp/ox-html.el
| @@ -1506,10 +1506,9 @@ INFO is a plist used as a communication channel.&q= uot;
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quo= t;iso-8859-1")))
| =C2=A0 =C2=A0 =C2=A0(concat
| =C2=A0 =C2=A0 =C2=A0 (format "<title>%s</title>\n" = title)
| - =C2=A0 =C2=A0 (format
| - =C2=A0 =C2=A0 =C2=A0(when :time-stamp-file
| - =C2=A0 =C2=A0 (format-time-string
| - =C2=A0 =C2=A0 =C2=A0(concat "<!-- " org-html-metadata-time= stamp-format " -->\n"))))
| + =C2=A0 =C2=A0 (when (plist-get info :time-stamp-file)
| + =C2=A0 =C2=A0 =C2=A0 (format-time-string
| + =C2=A0 =C2=A0 =C2=A0(concat "<!-- " org-html-metadata-time= stamp-format " -->\n")))
| =C2=A0 =C2=A0 =C2=A0 (format
| =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (org-html-html5-p info)
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-html-close-tag "meta" " c= harset=3D\"%s\"" info)
`----

Nick

>
> On Sat, Jun 8, 2013 at 1:30 PM, Nick Dokos <ndokos@gmail.com> wrote:
>
> =C2=A0 =C2=A0 Haojun Bao <ba= ohaojun@gmail.com> writes:
>
> =C2=A0 =C2=A0 > The culprit code is the following:
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > =C2=A0 (when :time-stamp-file
> =C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 (format-time-string
> =C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 =C2=A0(concat "<!-- &quo= t; org-html-metadata-timestamp-format " -->\n")))
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > This `when' condition is always true, because := time-stamp-file is a
> =C2=A0 =C2=A0 > keyword and always eval to itself, never to nil. > =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > So I think org-export-time-stamp-file should be use= d instead of
> =C2=A0 =C2=A0 > :time-stamp-file.
> =C2=A0 =C2=A0 >
>
> =C2=A0 =C2=A0 What version are you using? In the version I have, the c= ode looks like
> =C2=A0 =C2=A0 this:
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (plist-get info :time-stamp-fi= le)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(format-time-string
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(concat "<!-- = " org-html-metadata-timestamp-format " -->\n")))
>
> =C2=A0 =C2=A0 Org-mode version 8.0.3 (release_8.0.3-197-g221768)
> =C2=A0 =C2=A0 [nb: this version includes a few local commits (irreleva= nt to this subject)]
> =C2=A0 =C2=A0 --
> =C2=A0 =C2=A0 Nick
>

--
Nick



--001a11c1bc041e889004dea5291c--