diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-11-19 23:17:32 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-11-19 23:17:32 +0100 |
commit | 1319a3be441e5b0d53c4e000d55bec7c62a9fb6c (patch) | |
tree | e6d7ab4971c020fb8023a5c476baad2046368ecf | |
parent | c3c33841ebb2e63867be83a4ce589505cccb64c4 (diff) | |
download | org-mode-1319a3be441e5b0d53c4e000d55bec7c62a9fb6c.tar.gz |
ox-html: Fix %d placeholder in pre/postamble string
* lisp/ox-html.el (org-html-format-spec): Correctly apply
`org-html-metadata-timestamp-format' on %d placeholder.
Reported-by: Pavel Panchekha <me@pavpanchekha.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110374>
-rw-r--r-- | lisp/ox-html.el | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 404b62f..63a8c84 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1875,25 +1875,24 @@ INFO is a plist used as a communication channel." (setq template (replace-match val t t template)))))))) (defun org-html-format-spec (info) - "Return format specification for elements that can be -used in the preamble or postamble." - `((?t . ,(org-export-data (plist-get info :title) info)) - (?s . ,(org-export-data (plist-get info :subtitle) info)) - (?d . ,(org-export-data (org-export-get-date info) info)) - (?T . ,(format-time-string - (plist-get info :html-metadata-timestamp-format))) - (?a . ,(org-export-data (plist-get info :author) info)) - (?e . ,(mapconcat - (lambda (e) - (format "<a href=\"mailto:%s\">%s</a>" e e)) - (split-string (plist-get info :email) ",+ *") - ", ")) - (?c . ,(plist-get info :creator)) - (?C . ,(let ((file (plist-get info :input-file))) - (format-time-string - (plist-get info :html-metadata-timestamp-format) - (when file (nth 5 (file-attributes file)))))) - (?v . ,(or (plist-get info :html-validation-link) "")))) + "Return format specification for preamble and postamble. +INFO is a plist used as a communication channel." + (let ((timestamp-format (plist-get info :html-metadata-timestamp-format))) + `((?t . ,(org-export-data (plist-get info :title) info)) + (?s . ,(org-export-data (plist-get info :subtitle) info)) + (?d . ,(org-export-data (org-export-get-date info timestamp-format) + info)) + (?T . ,(format-time-string timestamp-format)) + (?a . ,(org-export-data (plist-get info :author) info)) + (?e . ,(mapconcat + (lambda (e) (format "<a href=\"mailto:%s\">%s</a>" e e)) + (split-string (plist-get info :email) ",+ *") + ", ")) + (?c . ,(plist-get info :creator)) + (?C . ,(let ((file (plist-get info :input-file))) + (format-time-string timestamp-format + (and file (nth 5 (file-attributes file)))))) + (?v . ,(or (plist-get info :html-validation-link) ""))))) (defun org-html--build-pre/postamble (type info) "Return document preamble or postamble as a string, or nil. |