* [PATCH] 24.3; locate-library returning spurious paths
@ 2014-05-11 16:35 Alex Kosorukoff
0 siblings, 0 replies; only message in thread
From: Alex Kosorukoff @ 2014-05-11 16:35 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2653 bytes --]
Hello:
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))
Here is a patch to fix this
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: alex@3form.com-20140511055846-cdjb3ui1aqby0jy1
# target_branch: bzr://bzr.sv.gnu.org/emacs/trunk/
# testament_sha1: 026e246535785206c6c31c4e089f60eba3143716
# timestamp: 2014-05-10 23:00:03 -0700
# base_revision_id: monnier@iro.umontreal.ca-20140511034953-\
# 1mzcrftziwhrw9hl
#
# Begin patch
=== modified file 'lisp/subr.el'
--- lisp/subr.el 2014-04-09 01:48:07 +0000
+++ lisp/subr.el 2014-05-11 05:58:46 +0000
@@ -1859,8 +1859,7 @@
t))
(let ((file (locate-file library
(or path load-path)
- (append (unless nosuffix (get-load-suffixes))
- load-file-rep-suffixes))))
+ (unless nosuffix (get-load-suffixes)))))
(if interactive-call
(if file
(message "Library is file %s" (abbreviate-file-name file))
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWTQ4wWQAAXPfgCAwUGP/93MI
AAC////wUANaTdvdvZsdg8GKJMjTZUbR6TCE9MmkZqGjT1AGUiZpPJqn4KYmpmhHlMm1PUMhk9BJ
ECAQ0KexCepGjI9Q0APUGSo8Gpkg0NAAAAAAEpNUxNNHqekZGj1AeoAAACcIFuHKbfWK3DGNfGwC
uQ8oPwtu/tHw8uDMx69l+o0apMTKl009Pb9xiflkw5kIO+Znt24BiBga70HfYrlOkZdgMga5Hg2W
VL6tO2ujO8CYmo3AUO0OpiBS4GCagjB1pBbHQQF4KJo+pLFUHVFGVsyPya8V/k45wwdRitaUQcTD
OupAy/JNSm5dK6+KskI5r1HoXaeYZjA7KzG3g4NjUCsW6pbGgVoM6AQoqEkXHSi17gLM4sBJKJpG
EC0XDOH0qkS9lSN7mSgL2FwIVE6MBnKRTXymLfO5Uc0YxJ3wJINKjnJW8pi0B6xCbFJPaZkWqKkS
y6swaVUFEpK6S2DCeNYNtF9ASuuqdzkFizQ0pbQc9sEgsSW0rlpmkLZ55Cx40GYTwTbLtkYq0zgW
jd1rDCL23XvC2F7Tm4pOmm0SgRyLx1YjDfyhMmq/tzxJ5AXyaUEl3Y10zoiOtrRaAwBseEOd6lOA
kAiNQQ7rc99FIODCJbBFF8Bf/g1Si4p35GD8z7g7gIDCOujQ7EDa7IHytatCSVbjdNC8P34qyC5c
Jp4r0rtMx7vA0FTjRU7eLZts7ucPGrfUzymHvuAfiIzNt0HXKvWiwyZ/JWd2B4vKMIbKQNVXVqnp
FMoDQBnMUKDRPwZrMQzDedzxafO3pIdziWi6cq4jLhxsVgEeB9y821zgrY+xT8/4pgEfEUFghgA6
FM7dYHwDUE8MCN+sK8bhICPLtIXn4UxgwJgmUMpuMirZ/qkunzflrHrdqLakzKnO8zlAKwk54qcg
rlAINZgFREJ7VuRAKOmWV4VrAfXzyAoHTECZ7QytEfGC779s6sfYzJyNXCNFxS81xSoDlwRRPK0x
VXWtI3hXC+Uo9E9rG2UncuMmrsBprWqNFMOn3aVeyV2NTv2MIPfQ6RszsKgrAeDrDNdVNbmXoKP0
AhubwMxoAaYnjiMjoY5EJQIXANB6g16MxeFpK/xdyRThQkDQ4wWQ
[-- Attachment #2: Type: text/html, Size: 3609 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-11 16:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11 16:35 [PATCH] 24.3; locate-library returning spurious paths Alex Kosorukoff
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.