emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] missing autoloads / (void-variable org-version)


From: Sebastien Vauban
Subject: Re: [O] missing autoloads / (void-variable org-version)
Date: Thu, 26 Apr 2012 21:30:56 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (windows-nt)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]