Subject: Re: bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line

From: João Távora <[email-masked]>
Date: Fri, 28 Jun 2024 18:49:14 +0100

On Fri, Jun 28, 2024 at 3:41 PM Eli Zaretskii <[email-masked]> wrote:

> João, any comments?

Tiny switches for these customizations is not a good idea.  It's complex,
hard to find, and doesn't scale well

For this and other use cases we need something more robust like
in many packages, a user-customizable eglot-mode-line-format. You
can e.g.  use flymake-mode-like-format as an idea.  Of course,
the default value of eglot-mode-line-format would keep the
Eglot mode-line exactly as it is.

The default value would be something like

   ("[" eglot-mode-line-menu ":" eglot-mode-line-project-name
        eglot-mode-line-outstanding-requests "]")

To fix this problem, users would just remove eglot-project-name from the var
Many users want to get rid of the number of outstanding requests, this
would help them too.

Yet other users want to put the eglot mode-line menu somewhere else but
without the brackets.  You get the idea.

Here's the Flymake default value, btw.

João

flymake-mode-line-format is a variable defined in `flymake.el'.

Its value is
(" " flymake-mode-line-exception flymake-mode-line-counters)

Mode line construct for customizing Flymake information.

  This variable may be risky if used as a file-local variable.
  You can customize this variable.
  Probably introduced at or before Emacs version 28.1.

[back]