GNU bug report logs -
#71823
31.0.50; project-mode-line and eglot duplicate project-name in mode-line
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Fri, 28 Jun 2024 14:14:02 UTC
Severity: normal
Found in version 31.0.50
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Date: Fri, 28 Jun 2024 18:08:41 -0400
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 71823 <at> debbugs.gnu.org
>
> On Fri, Jun 28, 2024 at 1:49 PM João Távora <joaotavora <at> gmail.com> wrote:
>
> On Fri, Jun 28, 2024 at 3:41 PM Eli Zaretskii <eliz <at> gnu.org> 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.
>
> Yes, I agree.
>
> 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 figured some people might want to disable this code, so I made it customizable, but that customization is not
> essential. I'm happy to remove the customization, and just have the eglot modeline automatically remove the
> project-name when project-mode-line is set. That removes the need for any new customization variables,
> while still fixing the issue of duplication.
>
> Support for actual customization of the eglot mode line can be added later with an eglot-mode-line-format, as
> you suggest.
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
option belongs to project.el, so the fact that it adds the project
name to the mode line too indiscriminately can legitimately be
considered to be a problem with that option. Right? On top of that,
project-mode-line is new in Emacs 30, whereas Eglot has been showing
the project in its mode line before that. So once again, IMO the onus
is on project.el to fix this somehow. For example, by not adding this
to the mode line in Eglot-controlled buffers.
Adding Dmitry to the discussion.
This bug report was last modified 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.