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
Message #77 received at 17467 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, May 11, 2014 at 11:39 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca>wrote:
> > variant matched tramp.el.old which is not a valid library name.
>
> Who cares? The point is that if the user asks to load foo.el.old, we
> should consider load-file-rep-suffixes, whereas for "foo" we shouldn't.
> I'm not particularly worried about finding files with name "foo.el.old.el".
Do you mean we need this shortcut due to some performance considerations? I
am not sure why else we would want a partial solution when we can have a
complete one. In my opinion we should only consider load-file-rep-suffixes
if the name matches \\.elc?\\' (the difference is the end of string
marker), so foo.el and foo.el.old.el are both ok to extend with .gz, but
foo.el.old and foo shouldn't be extended. Am I missing something?
> + (unless nosuffix
> > + (if (string-match "\\.elc?\\(\\.gz\\)?\\'" library)
>
> I don't want to hardcode "gz" here. We have load-file-rep-suffixes for
> that.
>
Yes, you are right, .gz shouldn't be hardcoded. Though I am not sure if
allowing anything there is ok. Maybe we can just use (sring-match (concat
"\\.elc?\\(" (regexp_opt load-file-rep-suffixes) "\\)\\'") library)?
>
> > + (if (= 2 (length (match-data))) load-file-rep-suffixes)
> > + (get-load-suffixes))))))
>
> If you only use (get-load-suffixes) that will fail when we (load
> "~/.gnus").
> My check for absolute-file-name-p was not an optimization.
>
Got it.
Stefan
>
[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.