From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line Date: Fri, 28 Jun 2024 18:08:41 -0400 Message-ID: References: <86wmm9jfk7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000249764061bfa7eb8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39234"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 71823@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 29 00:25:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sNK1y-0009w0-Sd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jun 2024 00:25:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNK1g-0005YC-SY; Fri, 28 Jun 2024 18:25:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNK1f-0005Y2-18 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 18:25:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNK1e-0004N8-Lp for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 18:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNK1d-0000Rh-Tb for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 18:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2024 22:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71823 X-GNU-PR-Package: emacs Original-Received: via spool by 71823-submit@debbugs.gnu.org id=B71823.17196134791665 (code B ref 71823); Fri, 28 Jun 2024 22:25:01 +0000 Original-Received: (at 71823) by debbugs.gnu.org; 28 Jun 2024 22:24:39 +0000 Original-Received: from localhost ([127.0.0.1]:36283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNK1G-0000Qn-NX for submit@debbugs.gnu.org; Fri, 28 Jun 2024 18:24:39 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:49569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNK1D-0000QV-PW for 71823@debbugs.gnu.org; Fri, 28 Jun 2024 18:24:36 -0400 Original-Received: from mail-ej1-f70.google.com ([209.85.218.70]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.97.1) id 1sNJm1-00000002Txm-2nrr for 71823@debbugs.gnu.org; Fri, 28 Jun 2024 18:08:53 -0400 Original-Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a725eed1cfeso75238566b.3 for <71823@debbugs.gnu.org>; Fri, 28 Jun 2024 15:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1719612532; x=1720217332; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DM6jXLxtB1nODO5gjwSa0DFvPnX96boigN1a9P+7ZPg=; b=zCBSGHsmlQ5VotDy49bZH3FPPaiOKvQq5jWK1XTO/uUf4vHTAuRMxOGpj36EpGlj/z Xv/OOghyGZHv4+232+fxd0kbweGi98R5VkTfunR4duDhvKO5Etd4vOhUNkMatGBMTztJ gAU9a97fs+1qEafesMdizBm0t2OOp+jAer9F4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1719612533; bh=DM6jXLxtB1nODO5gjwSa0DFvPnX96boigN1a9P+7ZPg=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=CFxg1DO2oQ6XUPgQqylWYPEIh2aWtsG/Cpvur6CDL8z50j67VyAOnqoLuHmiiGV4C J53U1ShVjuoL4Kj4ZbPqTlkxeVsPIuOPD+YBmjk0jCdxwBreKpHVIFMsMHTNIqR7Vu H7eqJkkZCQu2TWqdDsUYZ6tT09BVIdjJAfhyXF7m0pZu7bm6lEyXbrUjmjhpnKhwrS wkRJMEwNbRcyBQFYlrUC0nuHo977mD2/EeX/s3mvD4P592FmbftBn3XoCCTZFGkHeL Vog0HibsjMjLkVRd/B+9hUBSmCsZW4xjd/Hk6GAkkPtFEOcbk5SvaoqLCFyyCtfJr1 pbVSvg3/hUgQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719612532; x=1720217332; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DM6jXLxtB1nODO5gjwSa0DFvPnX96boigN1a9P+7ZPg=; b=wczhbLEPI+0aE3GHzfetJgheYCvwZZ3wlSuTksl+UgrZ7veoVEp5JmcncyWLuuabAx mW1OpdWAOCxVPIj2CyuwpEKJr+cMwgJInIUdytjjPH+wVbyRRGTvxRWOaF5MtBInHenA mreCq9CeosApuTEEk/WVOn8zVmlKZhDrry/ud67IrLFldiS4tGSZxW7w0Ab5e6P1m9+C kvKf5T3pZ2GdoPIK1ZeXto0BeG4bWOzciYq8taCV9VO70lNLzsQkGA4MQk2dz7sgfZxs HzuDht1ZFflZO7uWO+V4ecWE0w+1I5q7U1GqmX8YvGtrClZeIJAlvQWChnPAEPY4+RP1 wBTw== X-Forwarded-Encrypted: i=1; AJvYcCWs7BaxRmqSv1Qjv1w0BMk+UiNR94yMMaxmFMxun6DYZX0v5BHzYNXfDFcxfA29+jFB7mSUIX4AQglohSgb1J2XL+l1B90= X-Gm-Message-State: AOJu0YzfIO1a2PQRwlcTjcpVEg4wWHHQAlkeLqv//OhkPxH6ILi8a3Cc 6Jqs5mDWsIYEddVtLZRBlKnRZEaMXyrV9GWTLGn6NQcgP+9crY165tboKk6H+SmkiDDres9MxTF xLt8o95pAvmEdE1sSJu6iS+p36alst7GacY/k8/fKJP1xWfNaFDGfzULmMuc/LX3xHPfDM0I+WA 8T5BE4l1/5rDhPNANRzb0hdlc1gQ== X-Received: by 2002:a17:907:a681:b0:a72:80b8:ba64 with SMTP id a640c23a62f3a-a7280b8bdf7mr659991766b.25.1719612532703; Fri, 28 Jun 2024 15:08:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAHsnBgQTh4W7Ei9UtVszsW/O/g+l6lsDJICeDKPpVRH1ZZUDWQmSCuMsNBOoTJsg4lC5X8C9Uf9MJ5Wl8t4c= X-Received: by 2002:a17:907:a681:b0:a72:80b8:ba64 with SMTP id a640c23a62f3a-a7280b8bdf7mr659990866b.25.1719612532358; Fri, 28 Jun 2024 15:08:52 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288083 Archived-At: --000000000000249764061bfa7eb8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 28, 2024 at 1:49=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > On Fri, Jun 28, 2024 at 3:41=E2=80=AFPM Eli Zaretskii wrot= e: > > > Jo=C3=A3o, 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. --000000000000249764061bfa7eb8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jun 28, 2024 at 1:49=E2=80=AFPM J= o=C3=A3o T=C3=A1vora <joaotavora= @gmail.com> wrote:
On Fri, Jun 28, 2024 at 3:41=E2=80=AFP= M Eli Zaretskii <eliz@= gnu.org> wrote:

> Jo=C3=A3o, any comments?

Tiny switches for these customizations is not a good idea.=C2=A0 It's c= omplex,
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.=C2=A0 use flymake-mode-like-format as an idea.=C2=A0 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 au= tomatically avoid duplicating=C2=A0project-name.

I= figured some people might want to disable this code,=C2=A0so I made it cus= tomizable, but that customization is not essential.=C2=A0 I'm happy to = remove the customization, and just have the eglot modeline automatically re= move the project-name when project-mode-line is set.=C2=A0 That removes the= need for any new customization variables, while still fixing the issue of = duplication.

Support for actual customization of t= he eglot mode line can be added later with an eglot-mode-line-format, as yo= u suggest.
--000000000000249764061bfa7eb8--