From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#71823: 31.0.50; project-mode-line and eglot duplicate project-name in mode-line Date: Wed, 3 Jul 2024 14:59:18 +0100 Message-ID: References: <86wmm9jfk7.fsf@gnu.org> <86o77kjk87.fsf@gnu.org> <17183c60-1733-4938-9a85-f3351c87bcb9@gutov.dev> <87jzi6fvar.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33385"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , Spencer Baugh , Eli Zaretskii , 71823@debbugs.gnu.org, Juri Linkov To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 03 16:02:17 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 1sP0Yr-0008RO-NK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jul 2024 16:02:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sP0Xi-0006fK-I8; Wed, 03 Jul 2024 10:01: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 1sP0Xf-0006ea-8M for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2024 10:01: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 1sP0Xd-0003eA-Bf for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2024 10:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sP0Xe-00023q-HS for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2024 10:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2024 14:01: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.17200152397882 (code B ref 71823); Wed, 03 Jul 2024 14:01:02 +0000 Original-Received: (at 71823) by debbugs.gnu.org; 3 Jul 2024 14:00:39 +0000 Original-Received: from localhost ([127.0.0.1]:39962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sP0XH-000233-B1 for submit@debbugs.gnu.org; Wed, 03 Jul 2024 10:00:39 -0400 Original-Received: from mail-oa1-f41.google.com ([209.85.160.41]:61478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sP0XF-00022r-ML for 71823@debbugs.gnu.org; Wed, 03 Jul 2024 10:00:38 -0400 Original-Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-25d634c5907so3386626fac.2 for <71823@debbugs.gnu.org>; Wed, 03 Jul 2024 07:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720015170; x=1720619970; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=A6+it7dv9y1/ceUCsb88D4kv9oD4VZe/iwOQzKSkNJc=; b=Dd6bUvpwN/ZUbbymoaBP8oECAv25+BzxvJeChEUWMMTXBIDtuVpH+p7ALph0vrCB96 Vb/0sgGyu+lLEVD6Kx019SJZ6/bLu+ne4oUvkHxkK/yXIU2o1WpJD5ANoJRtq2wY5vuQ ISjBDgPlRuAqz/V2z7ZwM9YznsU0qHJToSt94Patw7pqrEVINZ6W7NM8OdDmxLFvSDoz 7Zo7AsQRHPVdMMqbC7u48T4otBNYHBRBXakLDAaVb72lnMAhSdAEfKbDfCz0pae47JqV v+s17BommFWobrLfFAntBvsH4t4IwEEOLVqKJuCFgk01urZG/4ovg1dJJ3euvoHmM0bF rVxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720015170; x=1720619970; h=content-transfer-encoding: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=A6+it7dv9y1/ceUCsb88D4kv9oD4VZe/iwOQzKSkNJc=; b=gFW7wnxPjXYZ2r7+zac4iSGE41l9lou7EZgzRWU977ueHD6V3PKmRYWN5b2pOLpA9A 8qtCJSfRIp4zzhLvstaSJT/D9s2vThGOvgNdzwiAcUd+CpeLO5dHzpX34Usg3SQghCMX yWVFOrtPibQPbHgxmaX4p8zjQZJ3t7XVdMcT136Pivh+atI5LBXZ/vDiAqajLT4IGvuR KaDcU/1a7Wzh1EjYoTpD1ebY+RZbvaeha5PyTtRy2oQt3txA6GMa7JHQjux/BvPg2uqP jwfkjsRzdXxBoP/UrcKhhNDYpSdDe1sPiR5eaiu6IautuoiXtMZkRV62pYu9YmEVv5Wf 8yuA== X-Forwarded-Encrypted: i=1; AJvYcCVAlwzKjOl9l5SiB0hs7is7SsjNO4orQk0eI0YVe1sse1a0qXK45XJJoRUCSPc+ZHLTdHpspuhyhbMXedf7hcqNydVxVtA= X-Gm-Message-State: AOJu0YzHX9Gh2Ft2FB9G4bjjhHzrX/XJ+eQ0iBnlmgXijoOAjEviRfPS vQkSbLLU4/JQc0jSQKld/28M0JrXICuwyMWUahc+gh2hCYThrL/wyrksIxWj1vvGkXKQXHCaUQu C2ZXF2vr3F8D73WmnUCiEqdTpx44= X-Google-Smtp-Source: AGHT+IG5NrFHUClhGhvtW9j63Xcu+6zAgKc+eKshcPXEmz8oGrEtFojsOgkdn6e6swWuS0nSSTaPJRu84uaYsSOuid0= X-Received: by 2002:a05:6870:b155:b0:25c:c35f:e259 with SMTP id 586e51a60fabf-25db3442fa9mr11497098fac.34.1720015170030; Wed, 03 Jul 2024 06:59:30 -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:288320 Archived-At: On Wed, Jul 3, 2024 at 2:17=E2=80=AFPM Spencer Baugh wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > On Sun, Jun 30, 2024, 13:51 wrote: > > > > Jo=C3=A3o T=C3=A1vora writes: > > > On Sat, Jun 29, 2024, 15:24 Spencer Baugh wr= ote: > > > > > > Or, here's an alternative idea, more aggressive: > > > > > > What if Eglot just sets project-mode-line=3Dt in eglot-managed buff= ers, and removes the project-name from the Eglot entry > > > entirely? > > > > > > Then the language identifier would be the major mode, the project i= dentifier would be project-mode-line, and the eglot > > status > > > indicator would just be for the status of the server. > > > > > > Works for me, it's in line with Eglot's policy of setting other mode= s when managing buffers. Show a patch. > > > > Attached. > > > > 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. > > > > Yes. > > > > The only issue is that this was only added to mode-line-format in Emac= s > > 30, so we can only use it in Emacs 30 or later. > > > > No, that's not an issue, or rather your solution isn't the way to solve= it. In trunk Eglot use everything that is in trunk Emacs. In > > released Eglot versions name sure you depend on capable versions of cor= e GNU Elpa packages, a set which already includes > > project.el. So basically version bumps solves it. > > Yes, certainly. That's why I bumped the required version of project.el > in the Package-Requires. > > But, loading a newer version of project.el doesn't add the > project-mode-line entry to mode-line-format. That's done in > bindings.el, and can't be updated. So we still need to do something > else to accomodate an Emacs 29 user with an updated eglot.el and > project.el. Hmm, I don't like it I must say. I thought there would be some kind of project-mode-line-mode to call that would do what it has to do to put the project in the mode-line. Like this it feels too hacky and intrusive into project.el's and binding.el's implementation. I also don't understand the other changes (i.e. to the menu) but that's OK. I'm going back to my previous recommendation of redesigning Eglot's eglot--mode-line-format into eglot-mode-line-format in the likenes= s of other packages (Flymake for example). If I'm going to carefully review and test changes to Eglot's mode-line machinery like the ones you are presenting here, it might as well be the most useful changes possible. That change should fix this and other problems. Until then, I don't think this is an extremely serious problem. Jo=C3=A3o