Subject: bug#77480: 31.0.50; Flymake: impossible to show multiline diagnostics in echo area

From: João Távora <[email-masked]>
Date: Sat, 19 Apr 2025 17:03:53 +0100

If it wasn't clear from my previous emails in this thread, the "impossible"
in the subject is manifestly overstated.

Nevertheless I'm working on some Flymake changes such should make this much
easier. I'm doing this in the context of the other bug opened by Nicolás
around the same time, the number of which I don't have handy at the moment.

João

On Sat, Apr 19, 2025, 14:48 Eli Zaretskii <[email-masked]> wrote:

> Ping!  Any progress with this issue?
>
> > Cc: [email-masked]
> > From: Nicolás Ojeda Bär <[email-masked]>
> > Date: Fri, 4 Apr 2025 08:47:02 +0200
> >
> > On Thu, Apr 3, 2025 at 10:28 AM João Távora <[email-masked]>
> wrote:
> > > First, Flymake has two ways of showing
> > > diagnostic in the echo area:
> > >
> > > 1 flymake-mode insinuates itself onto ElDoc
> > >    eldoc-documentation-functions, which you have correctly identified,
> > >    so you get at-point echo area updates as you navigate code.
> > >
> > > 2. interactive, on-demand Flymake commands such as
> > >    flymake-goto-next-error
> > >
> > > In approach number 1, Flymake is usually sharing a hotly contested
> > > ElDoc-managed resource with many other outlets (since you use Eglot you
> > > know what I'm talking about).  I chose the "one line per backend"
> > > default rule from years of dealing with many user reports about this
> > > topic, as a means of keeping the maximum amount of users content.
> >
> > OK, thanks for the context.
> >
> > > In approach number 2, as far as I can see, you do suffer this
> > > limitation, and the line is truncated.  But this behaviour has been
> > > around since the inception of modern flymake as I rewrote it circa
> 2017.
> >
> > Indeed, I had 2. in mind when I wrote my previous email.
> >
> > > Changing approach number 2 to honour the
> > > `eldoc-echo-area-use-multiline-p` is very problematic for two reasons
> > > (a): it's odd to use a variable not really connected to the mechanism
> it
> > > uses to access that space, since it calls `message`directly. (b) it
> > > would break a lot of workflows everywhere.
> >
> > OK, that's fair.
> >
> > >   There are a good number of issues in the Eglot tracker showing how to
> > >   do this and how everyone has a slightly different view on the topic.
> >
> > Thanks for the pointer, I will take a look. I also tried Flycheck
> > which by default
> > does not truncate the diagnostics shown in the echo area.
> >
> > > So there is, in my view, no need for changes to ElDoc or Flymake in
> this
> > > regard.
> >
> > OK, that's fair.
> >
> > > > Looking at the Git history, this behaviour seems to have changed or
> > > > introduced recently, in commit
> 560950468588117b264a9f916fb578e0eb2a124a.
> > >
> > > By the way, this was 2 years ago, hardly "recently".
> >
> > True!
> >
> > > João
> >
> > Cheers,
> > Nicolas
> >
> >
> >
> >
>