[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] M-x org-version RET now produces some sensible in all po
From: |
Thomas S. Dye |
Subject: |
Re: [O] [PATCH] M-x org-version RET now produces some sensible in all possible install/use-cases |
Date: |
Sat, 19 May 2012 07:41:22 -1000 |
Achim Gratz <address@hidden> writes:
> Thomas S. Dye writes:
>> Thanks for your response.
>
> No, thank you — because it turns out that org-reload didn't do the right
> thing in your case (i.e. after an org-reload, you'll see that pesky
> "N/A" again). Here's a patch to fix that.
>
I pulled from git and reloaded. Org-version now gives this:
Org-mode version 7.8.10 (release_7.8.10-568-gc84cda @
/Users/dk/.emacs.d/src/org/lisp/)
I think all is well.
All the best,
Tom
> From 20306fd6a576b06cc5783658feafc9a3335f3277 Mon Sep 17 00:00:00 2001
> From: Achim Gratz <address@hidden>
> Date: Sat, 19 May 2012 10:44:24 +0200
> Subject: [PATCH] fix org-reload and add parameters to customize output from
> org-version
>
> * lisp/org.el(org-version): Add optional parameters 'full and 'message
> to optionally return the full version string and echo to message
> area in non-interactive calls.
>
> * lisp/org.el(org-submit-bug-report): Add optional parameter 'full to
> call of (org-version) so that the bug report has all version
> information.
>
> * lisp/org.el(org-reload): Simplify file-re (orgtbl-*.el files do not
> exist anymore). Keep org-*.el at the end of the files list.
> Explicitely load org-version.el (since it doesn't provide feature
> 'org-version) at the very end, but ignore errors when it doesn't
> exist. Add parameters 'full and 'message to the call
> of (org-version) so that after reload the full version information
> is displayed in the message area again.
> ---
> lisp/org.el | 29 ++++++++++++++++-------------
> 1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 7b34576..6f7aebb 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -216,7 +216,7 @@ (defcustom org-clone-delete-id nil
> 'noerror 'nomessage 'nosuffix)
> (org-no-warnings (org-fixup))))
> ;;;###autoload
> -(defun org-version (&optional here)
> +(defun org-version (&optional here full message)
> "Show the org-mode version in the echo area.
> With prefix arg HERE, insert it at point."
> (interactive "P")
> @@ -231,12 +231,14 @@ (defun org-version (&optional here)
> (if (string= org-dir org-install-dir)
> org-install-dir
> (concat "mixed installation! " org-install-dir
> " and " org-dir))
> - "org-install.el can not be found!"))))
> + "org-install.el can not be found!")))
> + (_version (if full version org-version)))
> (if (org-called-interactively-p 'interactive)
> (if here
> (insert version)
> (message version))
> - org-version)))
> + (if message (message _version))
> + _version)))
>
> ;;; Compatibility constants
>
> @@ -19514,7 +19516,7 @@ (defun org-submit-bug-report ()
> (let ((reporter-prompt-for-summary-p "Bug report subject: "))
> (reporter-submit-bug-report
> "address@hidden"
> - (org-version)
> + (org-version nil 'full)
> (let (list)
> (save-window-excursion
> (org-pop-to-buffer-same-window (get-buffer-create "*Warn about
> privacy*"))
> @@ -19595,13 +19597,13 @@ (defun org-reload (&optional uncompiled)
> With prefix arg UNCOMPILED, load the uncompiled versions."
> (interactive "P")
> (require 'find-func)
> - (let* ((file-re "^\\(org\\|orgtbl\\)\\(\\.el\\|-.*\\.el\\)")
> + (let* ((file-re "^org\\(-.*\\)?\\.el")
> (dir-org (file-name-directory (org-find-library-dir "org")))
> (dir-org-contrib (ignore-errors
> (file-name-directory
> (org-find-library-dir "org-contribdir"))))
> (babel-files
> - (mapcar (lambda (el) (concat "ob" (when el (format "-%s" el)) ".el"))
> + (mapcar (lambda (el) (concat (concat dir-org "ob") (when el (format
> "-%s" el)) ".el"))
> (append (list nil "comint" "eval" "exp" "keys"
> "lob" "ref" "table" "tangle")
> (delq nil
> @@ -19610,10 +19612,10 @@ (defun org-reload (&optional uncompiled)
> (when (cdr lang) (symbol-name (car lang))))
> org-babel-load-languages)))))
> (files
> - (append (directory-files dir-org t file-re)
> - babel-files
> + (append babel-files
> (and dir-org-contrib
> - (directory-files dir-org-contrib t file-re))))
> + (directory-files dir-org-contrib t file-re))
> + (directory-files dir-org t file-re)))
> (remove-re (concat (if (featurep 'xemacs)
> "org-colview" "org-colview-xemacs")
> "\\'")))
> @@ -19627,10 +19629,11 @@ (defun org-reload (&optional uncompiled)
> (when (featurep (intern (file-name-nondirectory f)))
> (if (and (not uncompiled)
> (file-exists-p (concat f ".elc")))
> - (load (concat f ".elc") nil nil t)
> - (load (concat f ".el") nil nil t))))
> - files))
> - (org-version))
> + (load (concat f ".elc") nil nil 'nosuffix)
> + (load (concat f ".el") nil nil 'nosuffix))))
> + files)
> + (load (concat dir-org "org-version.el") 'noerror nil 'nosuffix))
> + (org-version nil 'full 'message))
>
> ;;;###autoload
> (defun org-customize ()
> --
> 1.7.9.2
>
>
>
> Regards,
> Achim.
--
Thomas S. Dye
http://www.tsdye.com
Re: [O] M-x org-version RET now produces some sensible in all possible install/use-cases, Achim Gratz, 2012/05/18