emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* M-x org-version RET now produces some sensible in all possible install/use-cases
@ 2012-05-18  6:45 Bastien
  2012-05-18 19:25 ` Thomas S. Dye
  2012-05-18 20:14 ` Achim Gratz
  0 siblings, 2 replies; 9+ messages in thread
From: Bastien @ 2012-05-18  6:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

an old haitian saying goes like this:

  "Ak pasyans ou vle lombik fourmi".

which translates: 

  "With patience, you see the ombilic of an ant."

One of my favorite saying when I spent some time working in
Port-au-Prince, where you get nothing with a lot of patience.

Thanks to patient and hard work of Achim, M-x org-version RET 
should  now return something sensible in each use-case.

Please pull and report any oddities in this area.

Best,

-- 
 Bastien

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

* Re: M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-18  6:45 M-x org-version RET now produces some sensible in all possible install/use-cases Bastien
@ 2012-05-18 19:25 ` Thomas S. Dye
  2012-05-18 19:41   ` Achim Gratz
  2012-05-18 20:14 ` Achim Gratz
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2012-05-18 19:25 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi all,
>
> an old haitian saying goes like this:
>
>   "Ak pasyans ou vle lombik fourmi".
>
> which translates: 
>
>   "With patience, you see the ombilic of an ant."
>
> One of my favorite saying when I spent some time working in
> Port-au-Prince, where you get nothing with a lot of patience.
>
> Thanks to patient and hard work of Achim, M-x org-version RET 
> should  now return something sensible in each use-case.
>
> Please pull and report any oddities in this area.
>
> Best,

Aloha Bastien,

This seems odd to me, but sensible:

Org-mode version N/A (N/A !!check installation!! @
/Users/dk/.emacs.d/src/org/lisp/)

I used to get a version number.

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-18 19:25 ` Thomas S. Dye
@ 2012-05-18 19:41   ` Achim Gratz
  2012-05-18 23:41     ` Thomas S. Dye
  0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-05-18 19:41 UTC (permalink / raw)
  To: emacs-orgmode

Thomas S. Dye writes:
> This seems odd to me, but sensible:
>
> Org-mode version N/A (N/A !!check installation!! @
> /Users/dk/.emacs.d/src/org/lisp/)

This means there is an org-install.el in that directory, but it doesn't
seem to be one that matches to your org version and both org-version.el
and UTILITIES/org-fixup.el seem to be missing.  If you want to run org
uncompiled, the load-path needs to pick up the Git work tree before
anything else and it is recommended to do an 'make autoloads' so that
you do not accidentally load a stale org-install.el (or a compiled org
file) from the org version that comes with Emacs or that you may have
formerly installed in some other place.  Please report what you get
from:

M-x locate-library
org
M-x locate-library
org-install
M-x locate-library
org-version

and check that your load-path is what you expect it to be.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-18  6:45 M-x org-version RET now produces some sensible in all possible install/use-cases Bastien
  2012-05-18 19:25 ` Thomas S. Dye
@ 2012-05-18 20:14 ` Achim Gratz
  1 sibling, 0 replies; 9+ messages in thread
From: Achim Gratz @ 2012-05-18 20:14 UTC (permalink / raw)
  To: emacs-orgmode

Bastien writes:
> Thanks to patient and hard work of Achim, M-x org-version RET 
> should  now return something sensible in each use-case.

There are basically two use-cases, not-installed and installed.
Not-installed comes in three flavors, although the first one has some
hard to avoid pitfalls and should be considered dangerous.  If the
autoload files are not or not fully generated, then determining the
version is done at runtime like in former org versions and relies on the
existence of $(lispdir)/../UTILITIES/org-fixup.el — if that can't be
found either, a default "N/A" version string will be output (which
should only be possible if somehow the lisp directory from org has been
copied by hand someplace else).


1) Org uninstalled (and possibly uncompiled) from Git or tarball.

1a) No org-version.el or org-install.el exists in worktree.  Partially
supported configuration, org version is determined from git if possible
via UTILITIES/org-fixup.el.  However, Emacs versions delivered with
orgmode will provide autoloads that may or may not work with that
version of org (mixed installation).  If such a situation is
encountered, warn the user.  It can work if the autoloads from the
installation match the ones that would be generated for the worktree,
which generally is only the case if there is a relatively recent
installation in site-lisp.

1b) Autoload file org-install.el exists in worktree, but not
org-version.el.  Fully supported configuration, org version is
determined from git if possible via UTILITIES/org-fixup.el.

1c) Both org-version.el or org-install.el exist in worktree.
Recommended configuration for 1), org version is taken from
org-version.el (git never gets invoked).

2) Org installed.  Both org-version.el and org-install.el must exist
in install directory.  Only supported configuration for 2), org
version is taken from org-version.el (git never gets invoked since
UTILITIES/org-fixup.el is not available).

Any unsupported configuration should still yield a version string, but
it will contain "N/A" to alert the user about a botched org
installation.


If "N/A" or a wrong version number is shown from 'M-x org-version' or the
path shown after the Git version is not what it should be or you see a
"mixed installation!" there, then please check with 'M-x locate-library'
where org, org-install and org-version are found (or that they are _not_
found at all, depending on which use case above you are targeting).  If
they are found, they must all be found in the same directory.

If you have leftover files from an older installation, re-configure
load-path so that Emacs doesn't find them, remove them altogether if
they are expendable or do a 'make cleanall' if they are in the org
directory.  From there, pick your use-case and try to stick to it (or at
least do another 'make cleanall' before you switch).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

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

* Re: M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-18 19:41   ` Achim Gratz
@ 2012-05-18 23:41     ` Thomas S. Dye
  2012-05-19  8:48       ` [PATCH] " Achim Gratz
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2012-05-18 23:41 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Aloha Achim,

Achim Gratz <Stromeko@nexgo.de> writes:

> Thomas S. Dye writes:
>> This seems odd to me, but sensible:
>>
>> Org-mode version N/A (N/A !!check installation!! @
>> /Users/dk/.emacs.d/src/org/lisp/)
>
> This means there is an org-install.el in that directory, but it doesn't
> seem to be one that matches to your org version and both org-version.el
> and UTILITIES/org-fixup.el seem to be missing.  If you want to run org
> uncompiled, the load-path needs to pick up the Git work tree before
> anything else and it is recommended to do an 'make autoloads' so that
> you do not accidentally load a stale org-install.el (or a compiled org
> file) from the org version that comes with Emacs or that you may have
> formerly installed in some other place.  Please report what you get
> from:
>
> M-x locate-library
> org
> M-x locate-library
> org-install
> M-x locate-library
> org-version
>
> and check that your load-path is what you expect it to be.
>
>
> Regards,
> Achim.

Thanks for your response.  

M-x locate-library finds all three libraries in ~/.emacs.d/src/org/lisp/

This is the Git work tree.

This path is at the beginning of load-path, before paths to the org
version that comes with Emacs.

I did 'make autoloads' and now org-version gives something familiar:

Org-mode version 7.8.10 (release_7.8.10-568-gc84cda @
/Users/dk/.emacs.d/src/org/lisp/)

Thanks again for your help.

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: [PATCH] M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-18 23:41     ` Thomas S. Dye
@ 2012-05-19  8:48       ` Achim Gratz
  2012-05-19  8:52         ` Bastien
  2012-05-19 17:41         ` Thomas S. Dye
  0 siblings, 2 replies; 9+ messages in thread
From: Achim Gratz @ 2012-05-19  8:48 UTC (permalink / raw)
  To: emacs-orgmode

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

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix org-reload --]
[-- Type: text/x-patch, Size: 4348 bytes --]

From 20306fd6a576b06cc5783658feafc9a3335f3277 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
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
      "emacs-orgmode@gnu.org"
-     (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


[-- Attachment #3: Type: text/plain, Size: 191 bytes --]



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

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

* Re: [PATCH] M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-19  8:48       ` [PATCH] " Achim Gratz
@ 2012-05-19  8:52         ` Bastien
  2012-05-19 17:41         ` Thomas S. Dye
  1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2012-05-19  8:52 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> 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.

Applied, thanks.

-- 
 Bastien (temporary patch monkey)

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

* Re: [PATCH] M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-19  8:48       ` [PATCH] " Achim Gratz
  2012-05-19  8:52         ` Bastien
@ 2012-05-19 17:41         ` Thomas S. Dye
  2012-05-19 18:02           ` Achim Gratz
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2012-05-19 17:41 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> 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 <Stromeko@Stromeko.DE>
> 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
>       "emacs-orgmode@gnu.org"
> -     (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

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

* Re: [PATCH] M-x org-version RET now produces some sensible in all possible install/use-cases
  2012-05-19 17:41         ` Thomas S. Dye
@ 2012-05-19 18:02           ` Achim Gratz
  0 siblings, 0 replies; 9+ messages in thread
From: Achim Gratz @ 2012-05-19 18:02 UTC (permalink / raw)
  To: emacs-orgmode

Thomas S. Dye writes:
> 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.

Thanks for testing and the confirmation.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

end of thread, other threads:[~2012-05-19 18:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18  6:45 M-x org-version RET now produces some sensible in all possible install/use-cases Bastien
2012-05-18 19:25 ` Thomas S. Dye
2012-05-18 19:41   ` Achim Gratz
2012-05-18 23:41     ` Thomas S. Dye
2012-05-19  8:48       ` [PATCH] " Achim Gratz
2012-05-19  8:52         ` Bastien
2012-05-19 17:41         ` Thomas S. Dye
2012-05-19 18:02           ` Achim Gratz
2012-05-18 20:14 ` Achim Gratz

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