[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17467: 24.3; locate-library returning spurious path
From: |
Stefan Monnier |
Subject: |
bug#17467: 24.3; locate-library returning spurious path |
Date: |
Thu, 15 May 2014 15:39:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> 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.
FWIW, this simply reflects what `load' does, so changing it in
`locate-library' would mean that it doesn't do what `load' does, which
I would count as a bug.
The main issue I see is that `load' includes a `must-suffix' argument
which provides the behavior you're looking for (and which is used by
`require') whereas locate-library doesn't provide it.
> 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))
IIUC the problem you had was with `load' rather than with
`locate-library', so I think what this boils down to is that the `load'
that looks for `trump' should be changed to provide `must-suffix'.
WDYT?
Stefan
- bug#17467: 24.3; locate-library returning spurious path, (continued)
- bug#17467: 24.3; locate-library returning spurious path, Alex Kosorukoff, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Stefan Monnier, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Alex Kosorukoff, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Glenn Morris, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Alex Kosorukoff, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Alex Kosorukoff, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Stefan Monnier, 2014/05/11
- bug#17467: 24.3; locate-library returning spurious path, Alex Kosorukoff, 2014/05/12
- bug#17467: 24.3; locate-library returning spurious path, Stefan Monnier, 2014/05/12
- bug#17467: 24.3; locate-library returning spurious path, Alex Kosorukoff, 2014/05/12
bug#17467: 24.3; locate-library returning spurious path,
Stefan Monnier <=