From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Add cl-defgeneric project-name; first use case eglot Date: Mon, 21 Nov 2022 13:50:37 +0000 Message-ID: <87sfica02a.fsf@gmail.com> References: <86zgcll1le.fsf@stephe-leake.org> <83a64k4fru.fsf@gnu.org> 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="20592"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stephen Leake , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 21 14:49:55 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ox7BL-00057k-2g for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Nov 2022 14:49:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ox7At-0004zK-Bt; Mon, 21 Nov 2022 08:49:27 -0500 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 1ox7Ar-0004z5-Fp for emacs-devel@gnu.org; Mon, 21 Nov 2022 08:49:26 -0500 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ox7Ap-0002N8-Qk; Mon, 21 Nov 2022 08:49:25 -0500 Original-Received: by mail-wm1-x334.google.com with SMTP id o30so8518146wms.2; Mon, 21 Nov 2022 05:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=mdFoGAdmar98uLQ2ZJZYxj7SVnWXBOB2/sSpHVQ5TM4=; b=Z8tI1lYK2iRiO3X+YpwfLxfoTjr8P3o3j9Q7Mt8Yu/K2UkqGQsMEgidlj0STyqExKg G2u+5qV7HUrEj6FxR0I6WLAc95fAt7oXYI7hgm680NoTve11rtZGXBRQ2ooJrgl/O2jT /vJp0uuytGS/+HD4dCBefwIrF2F3XcQSsvF785COVPfH5tDybnV1CnvV/BSkEnLjkKFH DABdcnqBJQIQ2Iddfhm6RWQD2eWRV611uIf5r7NmRKfxDfrhp8e/cG4xiBNuYZQG/PI6 EPCJd7heM5CaAfXz+tAmZHEeJQFBBoZvc/hdePKhkHeTveHZBSYaJd7CcNKmDnmSSMOu aorw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=mdFoGAdmar98uLQ2ZJZYxj7SVnWXBOB2/sSpHVQ5TM4=; b=4CTjKNqv/EBpsQriEArB6ZqLtGvf8YT2XiofXhR7Y+HmGok/K4/Jz/i4hKALdValW/ dGKrHlouDLMQzm4hR4XHLkL6kf7ixhtHGjsKj45l8bmJ2Ba8bnra82SV/nILqeSHjwWN BLxJ0t8eZrXs+JUCCZXwvWlcVnOjWJ7lCCEJinMBGgqTcpOlh4iMHH1OkF5efcpONM3S yNnORKCnU7hYSVozKkJaMrsF/nPpYfS79x/2b5Tc7oIwtzsJ3pHNvFtpZ+d81dVgal/P Prldbh1UV1sI7kTeNatdR+nK98jGPSTewEF7XaoPY0fHpdUeiMIUaEH6m30690c/RVow SCmA== X-Gm-Message-State: ANoB5pnqRYi3K+idtH/OD1qZmrCo2NCf40b6PBpDHFmYt2uGXy+YzWRk ngOmwiKRSfx26yMEda9q+MM2W9i9dI0= X-Google-Smtp-Source: AA0mqf4xgH1xi/vErtqA0coNYmgksrfo4ZbXT1oDKpft4e2jpwErVorWNN+s5CDSJhVloElIG62OaQ== X-Received: by 2002:a05:600c:3c8b:b0:3a6:2c43:f20a with SMTP id bg11-20020a05600c3c8b00b003a62c43f20amr6086128wmb.25.1669038561596; Mon, 21 Nov 2022 05:49:21 -0800 (PST) Original-Received: from krug (87-196-81-26.net.novis.pt. [87.196.81.26]) by smtp.gmail.com with ESMTPSA id n21-20020a05600c4f9500b003cfd64b6be1sm23921599wmq.27.2022.11.21.05.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 05:49:21 -0800 (PST) In-Reply-To: <83a64k4fru.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Nov 2022 15:07:49 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300296 Archived-At: Eli Zaretskii writes: >> From: Stephen Leake >> Cc: Jo=C3=A3o T=C3=A1vora >> Date: Sun, 20 Nov 2022 14:09:49 -0800 >>=20 >> eglot builds a name for a server using the root directory of the >> project - in effect: >>=20 >> (file-name-base (directory-file-name (project-root (project-current)))) >>=20 >> That name shows up in the elgot mode line, to tell the user which server >> the buffer is connected to, in progress report messages, and in the name >> of the EGLOT log buffer, which is useful for debugging things. >>=20 >> If the project root directory happens to have a meaningful name, that's >> fine. In my use cases, it's usually not meaningful. > > So Eglot should allow customization of what is shown on the mode line. Surely Eglot could offer that: a boolean option controlling whether to show the project's name in the mode-line. Or a more sophisticated eglot-mode-line-format in the style of e.g. flymake-mode-line-format so that multiple other things can be shown or hidden. As to where Eglot gets the project's human-readable name from, I can't think of a place other than project.el. As Stephen explained, currently Eglot guesses it from the name of the root directory, and that guess isn't suitable 100% of the time. So Stephen's suggestion sounds pretty reasonable to me. Jo=C3=A3o