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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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.