On Sun, Nov 11, 2001 at 01:52:22AM -0600, Manoj Srivastava wrote:
> Hi,
> >>"Rob" == Rob Browning <[EMAIL PROTECTED]> writes:
> 
>  Rob> Manoj Srivastava <[EMAIL PROTECTED]> writes:
> 
>  Rob> This isn't emacs21's problem as far as I can tell.  If you run emacs
>  Rob> with -q --no-site-file, load-path has the policy-specified
>  Rob> directories.  It looks like all the other packages are just putting
>  Rob> their dirs onto the front of load-path in their site-start.d files.
> 
>  Rob> I'm not sure why, though.  Emacs adds these dirs to the load path
>  Rob> after it starts up (recursively).
> 
>  Rob> Seems like a bug in a bunch of other packages to me, though it may be
>  Rob> that previous emacs versions didn't do the recursive load-path
>  Rob> additions.  However, even if that's true, it seems like to the end of
>  Rob> load-path might make more sense.
> 
>       Fair enough. I'll investigate and file bugs appropriately.
>  Could this  be an addition to the emacsen policy, now that emacs does
>  load-path additions by itself? 

Hi, Manoj and Rob

I have beeen digging into this old bug report, and noticed that the problem
appears even in packages using 
debian-startup.el->(debian-pkg-add-load-path-item)
function, not only in packages adding the path the wrong way. I have rewritten
that function to something more up to my taste to verify if it was the
function what was behaving wrongly, but I got the same result. Function I
used is

(defun debian-pkg-add-load-path-item (item)
  "Takes a path item (a string) and adds it to load path in the
correct position for an add-on package, before the emacs system
directories, but after the /usr/local/ directories.  After modifying
load-path, returns the new load-path."
  (let (etc-load-path
        local-load-path
        site-load-path
        system-load-path)
    (dolist (path load-path)
      (if (string-match "^/usr/local" path)
          (add-to-list 'local-load-path path t)
        (if (string-match "^/etc" path)
            (add-to-list 'etc-load-path path t)
          (if (string-match "/site-lisp/" path)
              (add-to-list 'site-load-path path t)
            (add-to-list 'system-load-path path t)))))
    (unless local-load-path
      (error "No /usr/local/ prefixed paths in load-path"))
    (add-to-list 'site-load-path item)
    (setq load-path
          (append etc-load-path
                  local-load-path
                  site-load-path
                  system-load-path)))
  load-path)


I finally noticed *where the bug really is*, in
debian-startup.el->(debian-run-directories) function, after reading the
/etc/emacs/site-start.d stuff, rearranges the load path and puts
site-lisp stuff first in the load-path, what is plain wrong.

Will try to look better into this bug.

-- 
Agustin



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to