From: Alan Mackenzie <acm@muc.de>
To: 52773@debbugs.gnu.org
Subject: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files.
Date: Fri, 24 Dec 2021 11:22:48 +0000 [thread overview]
Message-ID: <YcWtiOoZrb0/wpmz@ACM> (raw)
Hello, Emacs and Andrea.
With a native compiled recent master branch, do:
emacs -Q
M-x locate-library <RET> files <RET>
The result in the echo area is something like:
Library is file ~/emacs/emacs.git/sub-master-5/lisp/files.el
^^^
.. This is wrong. The Emacs is _NOT_ running uncompiled Lisp, it's
running native compiled files. The reply should be a file name ending
in ".eln".
This problem is surely also in the emacs-28 branch.
#########################################################################
The cause of the problem is in `locate-file' in files.el. There, if a
..eln file is found, it's corresponding .el source is looked up in a hash
table, and the .el name returned instead.
This mechanism was inserted by the following patch:
commit 3224a443060a5f21bb910064fc06fe4432810355
Author: Andrea Corallo <akrl@sdf.org>
Date: Sun Jul 19 10:46:24 2020 +0200
Move eln files into dedicated cache directories
When loading a elc file search for a corresponding eln one into
`comp-eln-load-path' directories and load it if available.
`comp-eln-load-path' contains by default two directory (user and
system one).
It seems there is some use case for which returning the .el file name in
place of the .eln is appropriate. It isn't appropriate for
locate-library.
I would suggest moving the hash table mechanism out of locate-file, and
into the other function which calls locate-file, where the substitution
is wanted.
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2021-12-24 11:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-24 11:22 Alan Mackenzie [this message]
2021-12-24 12:00 ` bug#52773: Master and (probably) emacs-28: locate-library hides .eln files Eli Zaretskii
2021-12-24 12:09 ` Lars Ingebrigtsen
2021-12-24 13:18 ` Andrea Corallo
2021-12-24 21:03 ` Alan Mackenzie
2021-12-25 10:43 ` Andrea Corallo
2021-12-25 11:25 ` Alan Mackenzie
2021-12-25 11:46 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YcWtiOoZrb0/wpmz@ACM \
--to=acm@muc.de \
--cc=52773@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.