GNU bug report logs -
#62816
30.0.50; ElDoc blinks echo area when eldoc-documentation-compose is used
Previous Next
Reported by: João Távora <joaotavora <at> gmail.com>
Date: Thu, 13 Apr 2023 14:47:01 UTC
Severity: normal
Found in version 30.0.50
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 13/04/2023 17:47, João Távora wrote:
> Hello,
>
> Originally reported by Dmitry Gutov <dmitry <at> gutov.dev> over
> at bug#62029:
>
>> It's trivially reproduced even with 'emacs -Q': just add somewhere
>> inside an Elisp buffer:
>
>> (remove-hook asd)
>
>> when flymake-mode is enabled and eldoc-documentation-strategy is
>> 'eldoc-documentation-compose, and eldoc-echo-area-use-multiline-p is
>> not 1, and move around 'asd' with C-f and C-b.
>
> I've confirmed this in a graphical Emacs frame. In a TTY frame, it's
> harder or impossible to spot.
>
> Traced the problem down to a misimplementation of the
> 'eldoc-documentation-compose' strategy, which leads to potentially one
> eldoc-message call to be issued for each member of
> 'eldoc-documentation-functions'. In fact, with this particular
> strategy, the intention at most one such call should occur (after all
> the documentation items of different backends have been collected).
>
> It's reasonably easy to fix, and I've been running the patch after my
> sig all day with no problems either in Elisp or other modes. The
> "blinking" observed before is gone.
>
> I'll push it to master soon, but leave this issue open for comments
> and/or feedback a little longer.
Thank you, it does seems to fix the issue with C-f/C-b in elisp-mode, in
the described situation.
I still see the problem with window jumping and blinking when typing
with company-mode enabled, though. You say: "I do use company and
multi-line echo areas liberally". Do you have some extra configuration
for company-frontends?
Here's a screencast that demonstrates the problem:
https://a.uguu.se/csTMrzxc.webm
One way to fix that is
(delq 'company-echo-metadata-frontend company-frontends)
but I wonder whether some better solution exists.
OTOH, Eglot implements the attribute which this frontend plugs into via
:company-docsig, and it seems like both with LSP servers that I just
tried it returns nil. If the feature is generally unused, I could
understand if Eglot users all disable this frontend anyway.
It is handy to have in emacs-lisp-mode, though. At least when there is
no documentation popup floating nearby.
This bug report was last modified 2 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.