From: Dmitry Gutov <dmitry@gutov.dev>
To: "João Távora" <joaotavora@gmail.com>, 62816@debbugs.gnu.org
Subject: bug#62816: 30.0.50; ElDoc blinks echo area when eldoc-documentation-compose is used
Date: Fri, 14 Apr 2023 01:58:19 +0300 [thread overview]
Message-ID: <c8c95f96-9a4a-6ec7-2b7d-c196f3952593@gutov.dev> (raw)
In-Reply-To: <87leivsusz.fsf@gmail.com>
On 13/04/2023 17:47, João Távora wrote:
> Hello,
>
> Originally reported by Dmitry Gutov <dmitry@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.
next prev parent reply other threads:[~2023-04-13 22:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 14:47 bug#62816: 30.0.50; ElDoc blinks echo area when eldoc-documentation-compose is used João Távora
2023-04-13 22:58 ` Dmitry Gutov [this message]
2023-04-13 23:23 ` João Távora
2023-04-13 23:37 ` Dmitry Gutov
2023-04-14 0:16 ` João Távora
2023-04-14 0:22 ` Dmitry Gutov
2023-04-15 1:03 ` Dmitry Gutov
2023-04-14 18:03 ` Dmitry Gutov
2023-04-14 18:09 ` João Távora
2023-04-14 18:53 ` Eli Zaretskii
2023-04-14 19:58 ` João Távora
2023-04-15 9:13 ` Eli Zaretskii
2023-04-15 11:04 ` João Távora
2023-04-15 11:40 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8c95f96-9a4a-6ec7-2b7d-c196f3952593@gutov.dev \
--to=dmitry@gutov.dev \
--cc=62816@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).