all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: sbaugh@catern.com
Cc: "Spencer Baugh" <sbaugh@janestreet.com>,
	"Eli Zaretskii" <eliz@gnu.org>,
	"João Távora" <joaotavora@gmail.com>,
	71823@debbugs.gnu.org, "Dmitry Gutov" <dmitry@gutov.dev>
Subject: bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line
Date: Sun, 30 Jun 2024 19:38:59 +0300	[thread overview]
Message-ID: <86plryo064.fsf@mail.linkov.net> (raw)
In-Reply-To: <87jzi6fvar.fsf@catern.com> (sbaugh@catern.com's message of "Sun,  30 Jun 2024 12:51:25 +0000 (UTC)")

> I do think this is a great way to resolve this - now that
> project-mode-line exists, using it deletes one small bit of
> eglot-specific functionality, which is in line with the Eglot design
> philosophy.
>
> The only issue is that this was only added to mode-line-format in Emacs
> 30, so we can only use it in Emacs 30 or later.
>
> The attached patch detects that with:
>
> +    (when (member '(project-mode-line project-mode-line-format) mode-line-format)
>
> but I'm also totally fine with:
>
> +    (when (version<= "30" emacs-version)
>
> Or I guess we could sidestep the issue if project.el itself ensured,
> when loaded, that mode-line-format contains project-mode-line.  eglot
> itself does this with eglot--mode-line-format, running the following at
> load time:
>
>   (add-to-list 'mode-line-misc-info
>              `(eglot--managed-mode (" [" eglot--mode-line-format "] ")))
>
> Juri, any opinion?

bindings.el already contains '(project-mode-line project-mode-line-format),
so checking this with (member '(project-mode-line project-mode-line-format)
mode-line-format) looks fine.

OTOH, I'm not sure if using (setq-local project-mode-line t)
would be appreciated by users.  I think your initial patch
was more correct with (bound-and-true-p project-mode-line).





  parent reply	other threads:[~2024-06-30 16:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 14:13 bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line Spencer Baugh
2024-06-28 14:15 ` Spencer Baugh
2024-06-28 14:40   ` Eli Zaretskii
2024-06-28 17:49     ` João Távora
2024-06-28 22:08       ` Spencer Baugh
2024-06-29  7:12         ` Eli Zaretskii
2024-06-29 11:59           ` Dmitry Gutov
2024-06-29 12:43             ` Eli Zaretskii
2024-06-30  6:50             ` Juri Linkov
2024-06-30 10:25               ` João Távora
2024-06-29 12:05           ` João Távora
2024-06-29 12:17             ` Dmitry Gutov
2024-06-29 12:21               ` João Távora
2024-06-29 12:41                 ` Spencer Baugh
2024-06-29 14:24                   ` Spencer Baugh
2024-06-30  0:25                     ` João Távora
2024-06-30 12:51                       ` sbaugh
2024-06-30 14:53                         ` João Távora
2024-06-30 15:05                           ` João Távora
2024-07-03 13:17                           ` Spencer Baugh
2024-07-03 13:59                             ` João Távora
2024-07-03 14:47                               ` Spencer Baugh
2024-07-03 14:57                                 ` João Távora
2024-07-03 15:12                                   ` Spencer Baugh
2024-07-03 16:03                                     ` João Távora
2024-07-03 17:10                                       ` sbaugh
2024-07-05 12:04                                         ` João Távora
2024-07-15 13:30                                           ` Spencer Baugh
2024-06-30 16:38                         ` Juri Linkov [this message]
2024-07-03 13:00                           ` Spencer Baugh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86plryo064.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=71823@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=sbaugh@catern.com \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.