From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: missing autoloads / (void-variable org-version) Date: Thu, 26 Apr 2012 21:30:56 +0200 Message-ID: <80ehrap9xr.fsf@somewhere.org> References: <87vcknm43o.fsf@Rainer.invalid> <80lililrk2.fsf@somewhere.org> <874ns61nqj.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Achim, Achim Gratz wrote: > Sebastien Vauban writes: >> Here, I would have thought that invoking the function `text-aux' would open >> the "production" Lisp file (that is, the one in Emacs code base) as you use >> Emacs loaddefs.el associations, no? > > It could be set up that way, but isn't. You wouldn't be able to move an > installed emacs tree if that were the case, and it could quite likely > break in other mysterious ways. I think you did not understand what I meant, or the opposite. Whatever, this presentation is not the most important thing. What you're trying to achieve *is*. First things first... To come back to what I understood from your text: 1. you have `test.el' in, let's say, `c:/Program Files/Emacs-24.0/lisp/test-mode' 2. the autoload definition for the function `test-aux' is in `c:/Program Files/Emacs-24.0/lisp' 3. you have latest Test package (dev version) in, let's say, `c:/home/sva/src/test-mode', with 2 files in there: + `test.el' + `test-aux.el' 4. you add `c:/home/sva/src/test-mode' *in front of* your `load-path' list 5. you, then, require `test.el' in your Emacs startup file; it loads the dev version (that is, `c:/home/sva/src/test-mode/test.el') 6. you, then, invoke the command `test-aux'. As the autoload says that, for getting the definition of that function, you need to load the file `test-aux.el', Emacs searches for that file, and finds the first occurrence in version `c:/home/sva/src/test-mode/test-aux.el' Here, due to a too quick reflexion, I thought that Emacs would load the base version in `c:/Program Files/Emacs-24.0/lisp/test-mode/test-aux.el'. But that's _not_ true, as: - only file names are given in `loaddefs.el', not full paths - the dev version directory has been placed first in `load-path'. So, I was wrong about my comment... Sorry for the noise. However, a problem that has bitten me twice already is that, in the above case, I would have this in my Emacs startup file: #+begin_src emacs-lisp (require 'xyz-package) ;; this one requires `test.el' but you don't see/know it ... ... ... (add-to-list 'load-path "c:/home/sva/src/test-mode") ;; before use of Test package (require 'test) ;; no-op in this case (test-aux) #+end_src You end up in mixed versions of the different functions. Typically the case where Org version looks like: Org-mode version 7.7 (release_7.8.09-400-g4a0e5b) But, when having a look at the value of `load-path', everything seems correct: you dev version is in front of your Emacs core version. You think that everything related to the Test package would have been loaded correctly. Not the case, "obviously"... Are we on the same wavelength? >> I've experienced enough couple of hours lost in the past, searching for >> problems due to mixed versions loaded, to know what the correct answer is. > > ...so, I count that as a "yes, fix it please"? Yep! I consider important that you fix things which you consider as flaws or broken pieces. Best regards, Seb -- Sebastien Vauban