diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2011-11-06 18:36:19 +0100 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2012-04-20 21:04:10 +0200 |
commit | cb8600b1ba15565f696ebfd34fc169508678262b (patch) | |
tree | ce2f0186a4e1a4c3f252336112f055d4034726b6 | |
parent | 6da2d089b0c0f165134e33e12267a51a9ac41f52 (diff) | |
download | org-mode-cb8600b1ba15565f696ebfd34fc169508678262b.tar.gz |
show installation path or org-install.el to avoid mishaps with multiple installations
* lisp/org.el (org-version): show the full path to org-install.el
in the version string to avoid confusion if multiple installations
exist or a previously loaded org-install.el has already defined a
version string that is now out of date.
-rw-r--r-- | lisp/org.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 9888157..1380148 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -111,6 +111,7 @@ (declare-function org-at-clock-log-p "org-clock" ()) (declare-function org-clock-timestamps-up "org-clock" ()) (declare-function org-clock-timestamps-down "org-clock" ()) +(declare-function find-library-name "find-func") ;; babel (require 'ob) @@ -208,6 +209,7 @@ identifier." ;;; Version +;;;###autoload (defun org-version (&optional here) "Show the org-mode version in the echo area. With prefix arg HERE, insert it at point." @@ -215,8 +217,11 @@ 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")) - (dir (concat (file-name-directory (locate-library "org")) "../" ))) - (setq version (format "Org-mode version %s (%s)" version git-version)) + (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))) |