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: Fri, 05 Jul 2024 13:04:15 +0100 Message-ID: <874j94gi4g.fsf@gmail.com> References: <86wmm9jfk7.fsf@gnu.org> <86o77kjk87.fsf@gnu.org> <17183c60-1733-4938-9a85-f3351c87bcb9@gutov.dev> <87jzi6fvar.fsf@catern.com> <87h6d6flld.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="5194"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , Eli Zaretskii , Juri Linkov , 71823@debbugs.gnu.org, Dmitry Gutov To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 05 14:05: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 1sPhgt-00014y-0G for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jul 2024 14:05:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPhgT-0005Us-3r; Fri, 05 Jul 2024 08:05:01 -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 1sPhgS-0005Ub-DC for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2024 08:05:00 -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 1sPhgR-0003AF-2T for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2024 08:04:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sPhgT-0004sW-Vy for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2024 08:05: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: Fri, 05 Jul 2024 12:05: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.172018105518672 (code B ref 71823); Fri, 05 Jul 2024 12:05:01 +0000 Original-Received: (at 71823) by debbugs.gnu.org; 5 Jul 2024 12:04:15 +0000 Original-Received: from localhost ([127.0.0.1]:43697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPhfj-0004r6-0y for submit@debbugs.gnu.org; Fri, 05 Jul 2024 08:04:15 -0400 Original-Received: from mail-lj1-f174.google.com ([209.85.208.174]:56784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPhfg-0004qn-TH for 71823@debbugs.gnu.org; Fri, 05 Jul 2024 08:04:13 -0400 Original-Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2ee910d6aaeso15541891fa.1 for <71823@debbugs.gnu.org>; Fri, 05 Jul 2024 05:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720180984; x=1720785784; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Krqd8IP4++us7gxgO1fvHUzr00iasESDbH34Mz1LQs0=; b=QJ9ldJ+NVGnu24xrhO1BZUxrF5/joWA7tkw/7tLWuW7SvQWLm4YazK5N6mR4710aUk gkl8w8Kqnxy90sWa1ZxPyuk5XbI2FAIeQ+D93J5wSmxoBIJlNt7+F0N9hYCEh7ZHCCkb ZNgNtBQpDHj2m+iEU9HeGFuCyZGgHtCyW61JEcr4YylpfvKXUubIwuszuXB+s9WlJA/w q+YGgmRWz0pdSCclRmfYciR3rBQEvvNcJ3IV+7K6Ph/cvaUX3x4jejE36fzNRxkCUmPk WAHRnMuQ74aQo959pl/D+IPd/CD7rsVjvxVMk9QRIIPsN3CgkFH93rN63599k69vGqgX 1xDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720180984; x=1720785784; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Krqd8IP4++us7gxgO1fvHUzr00iasESDbH34Mz1LQs0=; b=qLfm51WVchdpbf2h4xQoJ6Azr+decXBrSNc9+DFFV4SJUQa84g55k9rt73hPFeBX6X 58BmxA66c3j8q/X9VbjgLRLTeDXO0LmoFnkcHNcsiggE6eXLh58xY6q7Ob60zPXC6K4W unLfeI4KxSHfL2B2zElBc2ZR6OkV5HT3EKLtflFKA+9+HQ0f7/rs2tkzi5pnF2N79UyX F0FiHkY2hKQhB932pjPs2D/ySYau02n8Kv/fe8mPVROk/7B+31zhyOz/OmXQX9duxHF/ 4/0Iz0Q9d53tJCwN+7OXnUJ6Ar/wdX8ljm4uqE/rWWf9CurPqEgjFZrOzd6hz9qgu8LG pinQ== X-Forwarded-Encrypted: i=1; AJvYcCVNbYX6sO7tH/aaeF14ALv9PHHUZCIrQl+WB/oywC4KiQO69jORJuZyLqsPeUxwSnKNJc+HMnhJml2tgnq7MGSpNe3GF+M= X-Gm-Message-State: AOJu0YwbI0RJNo7JB23SH+g8UBVcjIhnYICh1amX+H+OfqLIAuUDKp0U XRio42KCf9C1cFSasROYiU9nyCC43WJLQK7hnmLX7Zs+eqV/oWgO X-Google-Smtp-Source: AGHT+IGnxD2PpIdw9U9R4uiYbvffG6m/Qqq8qITDW6CSk/CkMx1pZqnS4+KwR9w57AjVGGFQe3rDHg== X-Received: by 2002:a05:651c:2226:b0:2ec:5061:d7d2 with SMTP id 38308e7fff4ca-2ee8ed5ee10mr37928611fa.18.1720180983363; Fri, 05 Jul 2024 05:03:03 -0700 (PDT) Original-Received: from krug (87-196-76-11.net.novis.pt. [87.196.76.11]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3679c12440asm4103529f8f.73.2024.07.05.05.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 05:03:02 -0700 (PDT) In-Reply-To: <87h6d6flld.fsf@catern.com> (sbaugh@catern.com's message of "Wed, 03 Jul 2024 17:10:06 +0000 (UTC)") 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:288422 Archived-At: sbaugh@catern.com writes: > To be clear, I want a configuration which will have project-name from > project-mode-line and no project-name in the eglot mode-line entry. I understand. > So that functionality will need to be moved anyway, no matter how we > solve this problem. As I see it (now, not 2 weeks ago) only if the user wants the same as you. The reason I changed my mind is that I hadn't realized that section was being used for the server-specific menu. > Are you fine with including the server menu in the main menu? This is > something we'd want in both the "make it work by default" or "make it > customizable" solutions. No, I'm not sure of that. One of the reasons is that Eglot currently supports only one server, but there are many requests for it to support more than one in the future. So I'm not sure that's such a good move, whereas if the user decides they don't need the server menu, that's a different story. > It's better still to both allow the user to choose and *also* have a > default which works right out of the box. Those are two separate things > which we can do separately. AFAIK the current default is fine. Nothing is broken. > But allowing the user to choose adds a bunch of new customization points > that need to be maintained. Not a bunch of customization points. Only one, a very idiomatic one: eglot-mode-line-format. > I don't understand why we would add these new customization points > when we already are low on maintainer time for Eglot. I anticipate > adding these custosmization points would have lots of small bugs. I'm > all for doing it eventually, but making things work by default also > solves my problem, without adding new maintenance burden. I find this very contradictory, but that's just my opinion. It's precisely because we're low on maintainer capacity for Eglot that I don't want rash changes. No offense to your idea -- it seemed good and I approved and encouraged it, but in light of this new info, I've changed my mind. Also, Eglot enabling things outside its domain when managing buffers is indeed a design principle, but it usually applies to things that are _essential_ to helping Eglot do its job corectly (Flymake, ElDoc, even certain Company configurations). Now, I'm not sure showing the user the current project in the mode-line and giving them access to all those (undoutably useful) options is one of those "essential things", whereas telling the user that there is currently at least one live server is. Furthermore , not everyone likes this idea, as you may expect. Anyway, if you want a quick hack for your predicament, I think you can put this in your .emacs: (add-hook 'eglot-managed-mode-hook (lambda () (setf (eglot--project-nickname (eglot-current-server)) ""))) untested... Jo=C3=A3o