GNU bug report logs -
#17467
24.3; locate-library returning spurious path
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
I think locate-library has an extra parameter nosuffix, so (locate-library
"tramp.el" 'nosuffix) will find "tramp.el." I guess for backward
compatibility we can set nosuffix to t whenever the name has a valid suffix
already.
On Sun, May 11, 2014 at 10:03 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Alex Kosorukoff <alex <at> 3form.com>
> > Date: Sun, 11 May 2014 09:06:10 -0700
> >
> > locate-library incorrectly generates a set of suffixes to extend the
> > base library name (".elc" ".elc.gz" ".el" ".el.gz" "" ".gz"), while it
> > should be just (".elc" ".elc.gz" ".el" ".el.gz") when nosuffix is
> > nil. This leads to spurious paths found, like name.gz. I found
> > this issue because (locate-library "tramp") was returning
> > "/home/alex/.emacs.d/trump" not "../lisp/net/trum.elc". The workaround
> > is (locate-file "tramp" load-path (get-load-suffixes))
>
> What if I say
>
> (locate-library "tramp.el")
>
> Shouldn't it be able to find tramp.el.gz then?
>
[Message part 2 (text/html, inline)]
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.