Subject: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files.

From: Andrea Corallo <[email-masked]>
Date: Sat, 25 Dec 2021 10:43:51 +0000

Alan Mackenzie <[email-masked]> writes:

[...]

>> Hi Alan,
>
>> The trouble in this area is that `locate-library' might be used by
>> existing programs to obtain the source file (.elc files are tipically in
>> the same directory where the corresponding .el are).
>
> Are you saying that programs obtain the path of the .elc file, then
> expect to get the source file by removing the "c" at the end?

Precisely.

Despite what the docstring says we have to deal with the existing
software on the field.  IIRC at the time after a number of bug reports
was deemed that minimizing incompatibilities and making the
native-compiler as much transparent as possible was priority.

One option would be to update the docstring and add a second function to
return the true value similarly to what we did with
`load-true-file-name'.

The other option is of course what you've suggested.

Thanks!

  Andrea