Date: Thu, 4 Apr 2024 14:34:16 +0200
From: Ergus <spacibba@aol.com>
Cc: Hi-Angel@yandex.ru, rms@gnu.org, dmitry@gutov.dev, emacs-devel@gnu.org
On Thu, Apr 04, 2024 at 02:59:27PM +0300, Eli Zaretskii wrote:
>
>You are saying that Emacs can load project.elc from a wrong directory?
>Any reproducible recipe for that?
>
No Eli:
That's not what I mean.
Actually, yes, that's what you meant.
mkdir build1 && cd build1 && ../configure ... && make
cd ..
edit project.el
mkdir build2 && cd build2 && ../configure ... && make
cd ..
build1/src/emacs -Q
This will load the new elc, not the one used when it was compiled in
spite of we have not recompiled in that build dir.
AFAIU, it doesn't load the new project.elc from build2, it loads
project.el (i.e. uncompiled Lisp) from the source tree, where you
modified project.el.
The reason is that Emacs's support for "running uininstalled" assumes
the Lisp files are in the source tree. IOW, running uninstalled from
a build directory outside of the source tree does not take the *.elc
files from that build directory, as I think you can verify if you look
at the value of load-path.