GNU bug report logs - #77480
31.0.50; Flymake: impossible to show multiline diagnostics in echo area

Previous Next

Package: emacs;

Reported by: Nicolás Ojeda Bär <n.oje.bar <at> gmail.com>

Date: Thu, 3 Apr 2025 07:45:02 UTC

Severity: normal

Found in version 31.0.50

Done: Nicolás Ojeda Bär <n.oje.bar <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Nicolás Ojeda Bär <n.oje.bar <at> gmail.com>
Subject: bug#77480: closed (Re: bug#77480: 31.0.50; Flymake: impossible to
 show multiline diagnostics in echo area)
Date: Thu, 24 Apr 2025 08:10:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 77480 <at> debbugs.gnu.org.

-- 
77480: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77480
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Nicolás Ojeda Bär <n.oje.bar <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77480-done <at> debbugs.gnu.org
Subject: Re: bug#77480: 31.0.50; Flymake: impossible to show multiline
 diagnostics in echo area
Date: Thu, 24 Apr 2025 10:09:10 +0200
Closing bug.

Nicolas

On Thu, Apr 24, 2025 at 10:00 AM Nicolás Ojeda Bär <n.oje.bar <at> gmail.com> wrote:
>
> Hello,
>
> On Mon, Apr 21, 2025 at 10:02 AM João Távora <joaotavora <at> gmail.com> wrote:
> >
> > I've pushed these changes to master.  They should also be available shortly
> > in Flymake 1.4.0 from GNU ELPA.
> >
> > Please test and then this bug can be closed.
>
> Tested. I confirm it fixes the bug. Thanks!
>
> Cheers,
> Nicolas
>
> > João

[Message part 3 (message/rfc822, inline)]
From: Nicolás Ojeda Bär <n.oje.bar <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Flymake: impossible to show multiline diagnostics in echo
 area
Date: Thu, 03 Apr 2025 09:43:43 +0200
Dear Flymake maintainers (Cc: João Távora),

While using Eglot and its default Flymake integration, it seems
impossible to make Flymake display multi-line diagnostics in the echo
area: diagnostic messages are systematically truncated and only their
first line is shown.

While this may work well with certain language and diagnostic styles (eg
Lisp), it is wholly inadecuate for other types of languages where
diagnostics are routinely multiline and the first line offers no useful
information (because it is only part of sentence). This is the case of
OCaml, which I am using.

Furthermore, Flymake uses Eldoc to render diagnostics in the echo area,
and there is a variable eldoc-echo-area-use-multiline-p that looks like
it could be used to control this behaviour, but unfortunately Flymake
does not honour it.

Looking at the Git history, this behaviour seems to have changed or
introduced recently, in commit 560950468588117b264a9f916fb578e0eb2a124a.

Some possible approaches for improvement:

- Do not have Flymake truncate the message and instead delegate to Eldoc
  (supposedly, via the eldoc-echo-area-use-multiline-p variable, but I
  have not been able to test this variable so am not 100% sure of what
  its expected semantics are).

- Honour the variable eldoc-echo-area-use-multiline-p in the Flymake
  code (this seems strictly worse than the previous point as it would
  entail some code duplication).

- Add a variable to Flymake to specify whether to truncate or not
  diagnostics shown in the echo area. This could be useful if we want a
  separate mechanism than Eldoc's to control how diagnostics are shown
  in the echo area.

I am happy to prepare a patch if we can agree on a way forward.

Thank you!

Cheers,
Nicolas



This bug report was last modified 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.