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

From: João Távora <[email-masked]>
Date: Sat, 29 Jun 2024 13:05:41 +0100

On Sat, Jun 29, 2024 at 8:12 AM Eli Zaretskii <[email-masked]> wrote:

> Why not turn the table and consider this to be a problem of
> project.el, to be solved there?  After all, the project-mode-line

That could make sense (and this is nowhere near a serious problem IMHO),
but I have to admit that saying the onus being on Eglot is also defensible.
The project name is eminently project.el property after all.  What Eglot
is showing there is the "project nickname": it happens to coincide with
the project name for now but in rigour it would be a mnemonic for a
"project/language" tuple.  So it's not exactly the same thing.  I've
just never found a good way to express that.

> But my goal here isn't to make eglot-mode-line customizable, it's to add code to make the eglot mode line
> automatically avoid duplicating project-name.

I understand now, but I still think it's complex and makes the future
eglot-mode-line-format implementation harder.  In that mode-line-format
the 'eglot-mlf-project' symbol could come paired
with an optional 'eglot-mlf-project-maybe' that does the check you wnat.

João