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

From: Spencer Baugh <[email-masked]>
Date: Wed, 03 Jul 2024 11:12:09 -0400

João Távora <[email-masked]> writes:

> On Wed, Jul 3, 2024 at 3:47 PM Spencer Baugh <[email-masked]> wrote:
>
>> Do any of these seem acceptable?
>
> No, sorry.

When you originally said the patch was OK, how did you think the
project-mode-line worked?

Whatever way that is, I can just make project-mode-line work that way.

>> > I also don't understand the other changes (i.e. to the menu) but
>> > that's OK.
>>
>> The project-name in the eglot mode line entry had the server menu
>> attached to it.  Since the project-name is no longer present, the server
>> menu isn't accessible.  To make the server menu accessible again, it's
>> added to the main eglot menu.
>
> Ah right.  Well that unexpected side effect alone makes this
> approach unacceptable.

Why is that?  What's the problem with moving the server menu to the main
menu?

>> But I don't want to delegate the responsibility of solving this problem
>> to the user, I want the problem to just be gone: the entries should just
>> not duplicate project-name.
>
> This problem wasn't introduced by Eglot.

Definitely, but it seems like it is best to fix it in Eglot.  I hope we
can find a fix from the problem I want to solve, which is satisfying to
you.

> In fact I don't know if this is even a problem.  Users must know if
> they want to keep the Eglot mode line info working like it always did
> or if they want to tweak it to save space because of a new mode-line
> tenant that has since appeared in the very latest Emacs (a tenant
> which isn't even on by default).
>
> The problem in Eglot to me is that there isn't the possibility to
> do the latter thing, and _that's_ what I think should be addressed.

Right.  But even if we solved that, the problem I want to solve would
still exist, and I'd still want to solve it without requiring users to
do extra configuration, which is why I say there are separate problems.