diff options
author | Bastien Guerry <bzg@altern.org> | 2012-04-29 12:17:00 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-04-29 12:17:00 +0200 |
commit | 6732d633af89737086e5b19f0c9e33bc1fbf0b6f (patch) | |
tree | bf3ac9469f45261403b50527650f472878b96a2c | |
parent | d6e56bce71ecbab29b1200945cffc492997c0a29 (diff) | |
download | org-mode-6732d633af89737086e5b19f0c9e33bc1fbf0b6f.tar.gz |
Make (org-version) always returns a string, use it in exporters.
* org.el (org-version): When called non-interactively, insert
the short version string, otherwise send a message with the
complete version string.
* org-odt.el (org-odt-update-meta-file): Use (org-version) and
delegate checking whether `org-version' is known as a variable
there.
* org-html.el (org-export-as-html): Use (org-version).
* org-docbook.el (org-export-as-docbook): Ditto.
* org-latex.el (org-export-latex-make-header): Ditto.
-rw-r--r-- | lisp/org-docbook.el | 2 | ||||
-rw-r--r-- | lisp/org-html.el | 4 | ||||
-rw-r--r-- | lisp/org-latex.el | 2 | ||||
-rw-r--r-- | lisp/org-odt.el | 3 | ||||
-rw-r--r-- | lisp/org.el | 16 |
5 files changed, 14 insertions, 13 deletions
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index 7af766f..cf73d1d 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -629,7 +629,7 @@ publishing directory." (insert org-export-docbook-doctype)) (insert "<!-- Date: " date " -->\n") (insert (format "<!-- DocBook XML file generated by Org-mode %s Emacs %s -->\n" - org-version emacs-major-version)) + (org-version) emacs-major-version)) (insert org-export-docbook-article-header) (insert (format "\n <title>%s</title> diff --git a/lisp/org-html.el b/lisp/org-html.el index 2b381dd..bcbad61 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1835,7 +1835,7 @@ PUB-DIR is set, use this as the publishing directory." (split-string email ",+ *") ", ")) (creator-info - (concat "Org version " org-version " with Emacs version " + (concat "Org version " (org-version) " with Emacs version " (number-to-string emacs-major-version)))) (when (plist-get opt-plist :html-postamble) @@ -1857,7 +1857,7 @@ PUB-DIR is set, use this as the publishing directory." (insert "<p class=\"email\">" email "</p>\n")) (when (plist-get opt-plist :creator-info) (insert "<p class=\"creator\">" - (concat "Org version " org-version " with Emacs version " + (concat "Org version " (org-version) " with Emacs version " (number-to-string emacs-major-version) "</p>\n"))) (insert html-validation-link "\n")) (t diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 47472bb..9f58456 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1522,7 +1522,7 @@ OPT-PLIST is the options plist for current buffer." (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" (org-export-latex-fontify-headline keywords) (org-export-latex-fontify-headline description) - (concat "Emacs Org-mode version " org-version)) + (concat "Emacs Org-mode version " (org-version))) ;; beginning of the document "\n\\begin{document}\n\n" ;; insert the title command diff --git a/lisp/org-odt.el b/lisp/org-odt.el index 1560bba..cec0e8c 100644 --- a/lisp/org-odt.el +++ b/lisp/org-odt.el @@ -2383,8 +2383,7 @@ visually." (org-odt-format-tags '("\n<meta:generator>" . "</meta:generator>") (when org-export-creator-info (format "Org-%s/Emacs-%s" - (if (boundp 'org-version) org-version - "Unknown") + (org-version) emacs-version))) (org-odt-format-tags '("\n<meta:keyword>" . "</meta:keyword>") keywords) (org-odt-format-tags '("\n<dc:subject>" . "</dc:subject>") description) diff --git a/lisp/org.el b/lisp/org.el index 6ecfe13..19d2aca 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -218,13 +218,15 @@ With prefix arg HERE, insert it at point." (let* ((origin default-directory) (version (if (boundp 'org-release) org-release "N/A")) (git-version (if (boundp 'org-git-version) org-git-version "N/A")) - (org-install (ignore-errors (find-library-name "org-install")))) - (setq version (format "Org-mode version %s (%s @ %s)" - version - git-version - (if org-install org-install "org-install.el can not be found!"))) - (if here (insert version)) - (message version))) + (org-install (ignore-errors (find-library-name "org-install"))) + (version_ (format "Org-mode version %s (%s @ %s)" + version + git-version + (if org-install org-install "org-install.el can not be found!")))) + (if (org-called-interactively-p 'interactive) + (if here (insert version_) + (message version_)) + version))) ;;; Compatibility constants |