bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43609: 28.0.50; eldoc-documentation-function [vs new eldoc-display-f


From: João Távora
Subject: bug#43609: 28.0.50; eldoc-documentation-function [vs new eldoc-display-functions]
Date: Tue, 06 Oct 2020 10:29:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

> I tried to do that but wasn't able to get some useful behavior out of
> it.  All Emacs tells me is that it was entering the debugger.  Since you
> have both, the 'martin' function and the eldoc-tooltip-joao.el file,
> could you please just put the former into the latter and send it to me
> so I'm not doing anything wrong.

OK.  I've done a bit more work on that file, which I attach.  See the
Commentary: section.  You'll notice I removed a eldoc-tooltip--make-2
function and removed the global mode (I don't think it's strictly needed
and sort of stands in the way of this useful functionality, but you can
add it back, if you wish.)

> Maybe it's also the 'martin' function itself but I also (1) get an
> empty tooltip using that function in my normal eldoc-tooltip.el - so
> 'martin' apparently does not always "return nil when there’s no doc
> appropriate for the context" and (2) window scrolling sometimes stops
> here without apparent reason - something which may be completely
> unrelated to the eldoc problem, given that I have not pulled master
> for months.

Right, I fixed these bugs in the eldoc-tooltip-joao.el.  Sorry, but last
time I tested only very briefly, now I spent some more minutes on it.

>> Makes perfect sense I guess.  You should be able to
>>
>>    (remove-hook 'eldoc-display-functions 'eldoc-display-in-echo-area)
>
> This works indeed.

It's good to have some third party testing being done on this.

>> instead of a global minor mode.  Then you would let ElDoc mode _drive_
>> your extension.
>
> I'm not yet sure of the consequences of doing that.

Hopefully, a very useful new feature that works cooperates fully with
the ElDoc framework.

We'll see later how to add backward compatibility to Emacs 27 and
earlier.  Instead of reimplementing ElDoc's idle timers, I think the
best bet is to leverage `eldoc-message` either via
`eldoc-message-function' or with some advice for older version, like
Yuan Fu does.  It won't be as clean as the Emacs 28 implementation, but
should work.

João

Attachment: eldoc-tooltip-joao.el
Description: application/emacs-lisp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]