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

load-path in Emacsen



There seems to be something seriously wrong with the load-path in
current Emacsen.  The Debian Emacs Policy states:

,----
| 9) Emacs lisp load path.
|
|    At a minimum, each emacs must have the following directories in the
|    given order in their load path:
|
|      /etc/<flavor>
|      /etc/emacs
|      /usr/local/share/emacs/<upstream>/site-lisp
|      /usr/local/share/emacs/site-lisp
|      /usr/share/emacs/<flavor>/site-lisp
|      /usr/share/emacs/site-lisp
|
|    where <upstream> is the normal emacs upstream version number for
|    the relevant flavor like 20.2 or 19.34.
|
|    Emacs add-on packages may not modify load-path directly.  They must
|    use (debian-pkg-add-load-path-item <path>).  This function will
|    make sure that their additions end up in the right place -- before
|    the emacs system directories, but after the /usr/local/
|    directories.
`----

But look at the following (my site-start.el is empty):

$ emacs21 --batch --eval '(print load-path)' | sed -e 's/" /"\n/g'

Loading 00debian-vars...
Loading 20calc-init (source)...
Loading 49url (source)...
Loading 50auctex (source)...
Loading auctex.el (source)...
Loading /usr/lib/emacs/21.4/i486-linux-gnu/fns-21.4.1-x.el (source)...
Loading preview-latex.el (source)...
Loading 50autoconf (source)...
Loading 50chess (source)...
Loading chess-auto...
Loading 50dictionaries-common (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading 50dpkg-dev-el (source)...
Loading 50emacs-goodies-el (source)...
Loading 50gettext (source)...
Loading 50gnuplot-mode (source)...
Loading 50python-mode (source)...
Loading 50w3 (source)...
Loading 51debian-el (source)...

("/usr/share/emacs21/site-lisp/python-mode"
"/usr/share/emacs21/site-lisp/dictionaries-common"
"/usr/share/emacs21/site-lisp/chess"
"/usr/share/emacs/site-lisp/chess/"
"/usr/share/emacs/21.4/site-lisp/auctex"
"/usr/share/emacs21/site-lisp/debian-el"
"/usr/share/emacs21/site-lisp/emacs-goodies-el"
"/usr/share/emacs21/site-lisp/dpkg-dev-el"
"/usr/share/emacs21/site-lisp/dictionaries-common"
"/usr/share/emacs/site-lisp/autoconf"
"/usr/share/emacs/site-lisp/auctex/preview/"
"/usr/share/emacs/site-lisp/auctex/"
"/usr/share/emacs21/site-lisp/preview/"
"/usr/share/emacs21/site-lisp/auctex/"
"/usr/share/emacs21/site-lisp/calc"
"/usr/share/emacs/site-lisp/calc"
"/usr/share/emacs21/site-lisp/url"
"/usr/share/emacs21/site-lisp/gnuplot-mode"
"/usr/share/emacs21/site-lisp/w3-el"
"/etc/emacs21"
"/etc/emacs"
"/usr/local/share/emacs/21.4/site-lisp"
"/usr/local/share/emacs/site-lisp"
"/usr/share/emacs/21.4/site-lisp"
"/usr/share/emacs/21.4/site-lisp/calc"
"/usr/share/emacs/21.4/site-lisp/chess"
"/usr/share/emacs/21.4/site-lisp/debian-el"
"/usr/share/emacs/21.4/site-lisp/dictionaries-common"
"/usr/share/emacs/21.4/site-lisp/dpkg-dev-el"
"/usr/share/emacs/21.4/site-lisp/emacs-goodies-el"
"/usr/share/emacs/21.4/site-lisp/gettext"
"/usr/share/emacs/21.4/site-lisp/gnuplot-mode"
"/usr/share/emacs/21.4/site-lisp/python-mode"
"/usr/share/emacs/21.4/site-lisp/url"
"/usr/share/emacs/21.4/site-lisp/w3-el"
"/usr/share/emacs/site-lisp"
"/usr/share/emacs/21.4/leim"
"/usr/share/emacs/21.4/lisp"
"/usr/share/emacs/21.4/lisp/toolbar"
"/usr/share/emacs/21.4/lisp/textmodes"
"/usr/share/emacs/21.4/lisp/progmodes"
"/usr/share/emacs/21.4/lisp/play"
"/usr/share/emacs/21.4/lisp/obsolete"
"/usr/share/emacs/21.4/lisp/net"
"/usr/share/emacs/21.4/lisp/mail"
"/usr/share/emacs/21.4/lisp/language"
"/usr/share/emacs/21.4/lisp/international"
"/usr/share/emacs/21.4/lisp/gnus"
"/usr/share/emacs/21.4/lisp/eshell"
"/usr/share/emacs/21.4/lisp/emulation"
"/usr/share/emacs/21.4/lisp/emacs-lisp"
"/usr/share/emacs/21.4/lisp/calendar")

As you can see, the paths of the additions come well *before* the /etc
and /usr/local directories.  And, true, also after them -- note that
/usr/share/emacs21/site-lisp and /usr/share/emacs/21.4/site-lisp are
the same directory.

With emacs-snapshot instead of emacs21, the results are very similar.
What goes wrong here?





Reply to: