Subject: feature/native-comp; xref-find-definition searches compile location of el files instead of install location
From: Tom Gillespie <[email-masked]>
To: [email-masked], Andrea Corallo <[email-masked]>
Date: Wed, 19 Aug 2020 15:22:22 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Andrea,
    On feature/native-comp at 8a931a97b8dd19a38d6f719f810280a07ba76438
I am unable to use xref-find-definition to resolve a large subset of functions
including shell-command. This was not an issue at
9f01ce6327af886f26399924a9aadf16cdd4fd9f and is not an issue on master at
a566e409d0d962d3c2870691175836da22c31111. Repro is below and the messages
point to the cause being that xref-find-definitions is now looking in
the location where
the el files were during compilation instead of where they have been
installed. This
will cause problems for anyone distributing emacs in addition to distros where
compilation is sandboxed. To reproduce it on your end I suspect that
you will need
to use a different compile and install location for the el files. Best!
Tom

Repro:
emacs -q -batch --no-site-file --eval "(xref-find-definitions 'shell-command)"
Stdout:
No library /var/tmp/portage/app-editors/emacs-28.0.9999-r1/work/emacs/lisp/simple.el
in search path
No definitions found for: shell-command