From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line Date: Sat, 29 Jun 2024 10:12:24 +0300 Message-ID: <86o77kjk87.fsf@gnu.org> References: <86wmm9jfk7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11736"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, 71823@debbugs.gnu.org To: Spencer Baugh , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 29 09:15:27 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 1sNSIw-0002nl-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jun 2024 09:15:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNSIc-0007XA-7v; Sat, 29 Jun 2024 03:15:06 -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 1sNSIa-0007Wo-4R for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2024 03:15:04 -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 1sNSIY-0004mE-TW for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2024 03:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNSIY-0006R3-3Z for bug-gnu-emacs@gnu.org; Sat, 29 Jun 2024 03:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jun 2024 07:15:02 +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.171964528524692 (code B ref 71823); Sat, 29 Jun 2024 07:15:02 +0000 Original-Received: (at 71823) by debbugs.gnu.org; 29 Jun 2024 07:14:45 +0000 Original-Received: from localhost ([127.0.0.1]:36884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNSIH-0006QB-FZ for submit@debbugs.gnu.org; Sat, 29 Jun 2024 03:14:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNSIF-0006Pv-Kr for 71823@debbugs.gnu.org; Sat, 29 Jun 2024 03:14:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNSG3-0008Mb-S8; Sat, 29 Jun 2024 03:12:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Go05MgfrRbS+7lNgh2X0eDRN9svssKdbIdIaRBWkKVY=; b=mBaNdDRo2GfLYd5n7iq1 GqGhA2AxCMWGXu9oQNuMEYXkJqLg9ruWxM78Lf74pB/vP1pgGJUiLE0vsYlpmM9zn+otOzvJzQDmm SJ1qEz8L7LwZlgDIpUxtejItnDQBRWOexC8v1kUnI+CibR6JnLKpCVgRp0Qpeszbt0iaH3N++/YiW InWHWShfvh5P75gJQssQKBpxUdNaA2beJL1enw8r/bHlSN6ighyiEcD3t5w58+5YxzvjmWbTbysHB LNNphxTm3FlSDCCYxgnv6KTTNrXSU/JeD8LNJkgeIXepSLqW7x/z4EUv1fxrgSCgZWdsvKFwy4ucD gQNZ8XyReASfIQ==; In-Reply-To: (message from Spencer Baugh on Fri, 28 Jun 2024 18:08:41 -0400) 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:288099 Archived-At: > From: Spencer Baugh > Date: Fri, 28 Jun 2024 18:08:41 -0400 > Cc: Eli Zaretskii , 71823@debbugs.gnu.org > > On Fri, Jun 28, 2024 at 1:49 PM João Távora wrote: > > On Fri, Jun 28, 2024 at 3:41 PM Eli Zaretskii 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.