Subject: Re: bug#77169: [PATCH] New Eldoc function `help-at-pt-eldoc-function'

From: Daniel Mendler <[email-masked]>
Date: Sat, 22 Mar 2025 12:29:13 +0100

Eli Zaretskii <[email-masked]> writes:

>> Date: Sat, 22 Mar 2025 10:40:18 +0100
>> From:  Daniel Mendler via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> This patch proposes the addition of a new Eldoc function
>> `help-at-pt-eldoc-function'.
>> 
>> Show help-at-pt string via Eldoc as an alternative to the
>> `help-at-pt-display-when-idle' timer.  The help-at-pt timer competes
>> with Eldoc for the echo area, such that using both does not work well.
>> The new `help-at-pt-eldoc-function' is meant to be added to
>> `eldoc-documentation-functions'.

Eli, thank you for looking at the patch so quickly.

> Thanks, but please also reflect this feature in the doc string of
> help-at-pt-display-when-idle and in the Emacs user manual (where that
> option is described).

The question is if `help-at-pt-display-when-idle' should be marked
obsolete in favor of the Eldoc mechanism to avoid conflicts. Eldoc is
even preloaded these days, so the de-facto standard for documentation at
point.

> Also, shouldn't we have a user option to turn this on in ElDoc?

Not sure if we need an option given that it is easy to add the function
to the list, or remove it, if the function is enabled by default.

(add-hook 'eldoc-documentation-functions #'help-at-pt-eldoc-function)
(remove-hook 'eldoc-documentation-functions #'help-at-pt-eldoc-function)

> And what about a NEWS entry?

I will add one.

Daniel