GNU bug report logs - #17467
24.3; locate-library returning spurious path

Previous Next

Package: emacs;

Reported by: Alex Kosorukoff <alex <at> 3form.com>

Date: Sun, 11 May 2014 16:51:02 UTC

Severity: minor

Tags: patch

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 17467 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alex Kosorukoff <alex <at> 3form.com>
Cc: 17467 <17467 <at> debbugs.gnu.org>
Subject: Re: bug#17467: 24.3; locate-library returning spurious path
Date: Sun, 11 May 2014 17:56:15 -0400
> The issue is that locate-library returns spurious paths like ".*/tramp" or
> ".*xxx/tramp.gz"

I don't see why these are necessarily spurious.  Please give very
concrete examples, so as to make it crystal clear why they're spurious.

> This is both unexpected and incorrect given this function name and
> spec.

Unexpected to you, obviously, but I'm not convinced it's unexpected in
general (after all, I don't remember other bug-reports in this area) and
definitely not incorrect.  See the docstring of `load':

   Execute a file of Lisp code named FILE.
   First try FILE with `.elc' appended, then try with `.el',
   then try FILE unmodified (the exact suffixes in the exact order are
   determined by `load-suffixes').  Environment variable references in
   [...]

Of course, there's an ambiguity about how the search is performed,
w.r.t. to whether it does:

   (dolist (s suffixes) (dolist (d load-path) ...)))
or
   (dolist (d load-path) (dolist (s suffixes) ...)))

We do the second, so that a compiled file in a later directory does not
override a non-compiled file in an earlier directory.


        Stefan




This bug report was last modified 4 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.