From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line Date: Sun, 30 Jun 2024 09:50:36 +0300 Organization: LINKOV.NET Message-ID: <86jzi7q71j.fsf@mail.linkov.net> References: <86wmm9jfk7.fsf@gnu.org> <86o77kjk87.fsf@gnu.org> <5782856d-9c8f-4903-9d42-143a015fee14@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35528"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Spencer Baugh , Eli Zaretskii , joaotavora@gmail.com, 71823@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 30 08:56:41 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 1sNoUL-00097S-JU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jun 2024 08:56:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNoTj-0006b4-IQ; Sun, 30 Jun 2024 02:56:03 -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 1sNoTi-0006au-Q2 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 02:56:02 -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 1sNoTi-0007nz-GD for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 02:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNoTh-0006iY-UG for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 02:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2024 06:56: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.171973055525809 (code B ref 71823); Sun, 30 Jun 2024 06:56:01 +0000 Original-Received: (at 71823) by debbugs.gnu.org; 30 Jun 2024 06:55:55 +0000 Original-Received: from localhost ([127.0.0.1]:54752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNoTa-0006iD-Sb for submit@debbugs.gnu.org; Sun, 30 Jun 2024 02:55:55 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:41605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNoTZ-0006hz-Pa for 71823@debbugs.gnu.org; Sun, 30 Jun 2024 02:55:54 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 859C01C0003; Sun, 30 Jun 2024 06:55:25 +0000 (UTC) In-Reply-To: <5782856d-9c8f-4903-9d42-143a015fee14@gutov.dev> (Dmitry Gutov's message of "Sat, 29 Jun 2024 14:59:10 +0300") X-GND-Sasl: juri@linkov.net 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:288172 Archived-At: >> 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? > > It's "discriminate" and off by default. > >> 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. > > Hard-coding an "unless Eglot" condition seems like a bad idea in terms of > abstraction and general code logic. I completely agree. When a user explicitly expressed the wish to display the project name in the middle of the mode line by customizing project-mode-line to t, this means there is no need to duplicate it at the end of the mode line with Eglot information. This will make the mode line shorter. Ideally, everything should be customizable by two new Eglot options: eglot-mode-line-format and eglot-mode-line-position (e.g. middle/end).