emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug(?) ox-html always add a timestamp in comment which can't be customized away
@ 2013-06-08  5:22 Haojun Bao
  2013-06-08  5:30 ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Haojun Bao @ 2013-06-08  5:22 UTC (permalink / raw)
  To: emacs-orgmode

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

The culprit code is the following:

  (when :time-stamp-file
    (format-time-string
     (concat "<!-- " org-html-metadata-timestamp-format " -->\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.

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

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

* Re: bug(?) ox-html always add a timestamp in comment which can't be customized away
  2013-06-08  5:22 bug(?) ox-html always add a timestamp in comment which can't be customized away Haojun Bao
@ 2013-06-08  5:30 ` Nick Dokos
  2013-06-08  5:46   ` Haojun Bao
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2013-06-08  5:30 UTC (permalink / raw)
  To: emacs-orgmode

Haojun Bao <baohaojun@gmail.com> writes:

> The culprit code is the following:
>
>   (when :time-stamp-file
>     (format-time-string
>      (concat "<!-- " org-html-metadata-timestamp-format " -->\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 "<!-- " org-html-metadata-timestamp-format " -->\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

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

* Re: bug(?) ox-html always add a timestamp in comment which can't be customized away
  2013-06-08  5:30 ` Nick Dokos
@ 2013-06-08  5:46   ` Haojun Bao
  2013-06-08  6:04     ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Haojun Bao @ 2013-06-08  5:46 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

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

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?


On Sat, Jun 8, 2013 at 1:30 PM, Nick Dokos <ndokos@gmail.com> wrote:

> Haojun Bao <baohaojun@gmail.com> writes:
>
> > The culprit code is the following:
> >
> >   (when :time-stamp-file
> >     (format-time-string
> >      (concat "<!-- " org-html-metadata-timestamp-format " -->\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 "<!-- " org-html-metadata-timestamp-format " -->\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
>
>
>

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

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

* Re: bug(?) ox-html always add a timestamp in comment which can't be customized away
  2013-06-08  5:46   ` Haojun Bao
@ 2013-06-08  6:04     ` Nick Dokos
  2013-06-08 14:14       ` Haojun Bao
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2013-06-08  6:04 UTC (permalink / raw)
  To: emacs-orgmode

Haojun Bao <baohaojun@gmail.com> 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 "<!-- " 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:   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 "<title>%s</title>\n" title)
| -     (format
| -      (when :time-stamp-file
| -	(format-time-string
| -	 (concat "<!-- " org-html-metadata-timestamp-format " -->\n"))))
| +     (when (plist-get info :time-stamp-file)
| +       (format-time-string
| +	 (concat "<!-- " org-html-metadata-timestamp-format " -->\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 <ndokos@gmail.com> wrote:
>
>     Haojun Bao <baohaojun@gmail.com> writes:
>    
>     > The culprit code is the following:
>     >
>     >   (when :time-stamp-file
>     >     (format-time-string
>     >      (concat "<!-- " org-html-metadata-timestamp-format " -->\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 "<!-- " org-html-metadata-timestamp-format " -->\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

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

* Re: bug(?) ox-html always add a timestamp in comment which can't be customized away
  2013-06-08  6:04     ` Nick Dokos
@ 2013-06-08 14:14       ` Haojun Bao
  0 siblings, 0 replies; 5+ messages in thread
From: Haojun Bao @ 2013-06-08 14:14 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

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

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
> 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 "<!-- "
> 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:   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 "<title>%s</title>\n" title)
> | -     (format
> | -      (when :time-stamp-file
> | -     (format-time-string
> | -      (concat "<!-- " org-html-metadata-timestamp-format " -->\n"))))
> | +     (when (plist-get info :time-stamp-file)
> | +       (format-time-string
> | +      (concat "<!-- " org-html-metadata-timestamp-format " -->\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 <ndokos@gmail.com> wrote:
> >
> >     Haojun Bao <baohaojun@gmail.com> writes:
> >
> >     > The culprit code is the following:
> >     >
> >     >   (when :time-stamp-file
> >     >     (format-time-string
> >     >      (concat "<!-- " org-html-metadata-timestamp-format " -->\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 "<!-- " org-html-metadata-timestamp-format "
> -->\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
>
>
>

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

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

end of thread, other threads:[~2013-06-08 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-08  5:22 bug(?) ox-html always add a timestamp in comment which can't be customized away Haojun Bao
2013-06-08  5:30 ` Nick Dokos
2013-06-08  5:46   ` Haojun Bao
2013-06-08  6:04     ` Nick Dokos
2013-06-08 14:14       ` Haojun Bao

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