Subject: Re: bug#50508: 27.2; find-function ignore find-function-source-path

From: Thierry Volpiatto <[email-masked]>
Date: Mon, 13 Sep 2021 15:24:24 +0000

Lars Ingebrigtsen <[email-masked]> writes:

> Thierry Volpiatto <[email-masked]> writes:
>
>> Lars Ingebrigtsen <[email-masked]> writes:
>>
>>> 2) If the function was defined in a .el file (as this bug report
>>> describes), then Emacs knows the name of the library.  But it doesn't
>>> then use `find-library-name' to locate the library, but just uses
>>> load-history.  Fixing this is pretty easy -- just use
>>> `find-library-name' and use that instead of the value from
>>> `load-history'.
>>
>> Yes, this is working fine, it is what I am using actually.
>> https://github.com/emacs-helm/helm/blob/master/helm-lib.el#L1230
>
> I'm just wondering whether it makes sense to fix 2) if we're not fixing
> 1), and I don't think fixing 1) is a good idea (it'd make the function
> massively slower).
>
> Instead I'm wondering whether we should just fix the doc strings here to
> not mention `find-function-source-path' in `find-function' (etc), so
> that the doc string matches the implementation, and instead mention
> `find-library-name' (in the doc string) for your use case.

Yes sure, that's ok for me, I was just surprized to not be able to
let-bound `find-function-source-path` and run find-function just after
with the expected effect described in docstring, once you know it, you
can just write a function using `find-library-name` like I did.

Thanks.

-- 
Thierry