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#63469: 29.0.90; project.el doesn't add menu-bar entries Date: Fri, 02 Jun 2023 09:37:20 +0300 Organization: LINKOV.NET Message-ID: <86o7lyxugp.fsf@mail.linkov.net> References: <83mt21vfgl.fsf@gnu.org> <86mt211vk3.fsf@mail.linkov.net> <0ce4532f-03aa-6afe-bd8f-8ef1df6615de@gutov.dev> <86ilco7qbs.fsf@mail.linkov.net> <83r0rctxbc.fsf@gnu.org> <867ct4b4ds.fsf@mail.linkov.net> <835y8otbub.fsf@gnu.org> <86o7mccl5z.fsf@mail.linkov.net> <63854a1a-8178-d039-288c-34b1e67e5b06@gutov.dev> <86ttw3blc6.fsf@mail.linkov.net> <86sfbm6hp5.fsf@mail.linkov.net> <86jzwyw8j5.fsf@mail.linkov.net> <6a5c2251-52a8-e389-f2ab-08da775fab82@gutov.dev> <867csw53fm.fsf@mail.linkov.net> <868rdcfe3n.fsf@mail.linkov.net> <87c247b4-21c8-4dfe-2ef8-ba4365f4562e@gutov.dev> <86ilc98zr1.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30831"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: sbaugh@janestreet.com, Eli Zaretskii , 63469@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 02 09:06:33 2023 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 1q4yro-0007qW-RY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Jun 2023 09:06:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4yrM-0005bp-ET; Fri, 02 Jun 2023 03:06:04 -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 1q4yrK-0005am-Pf for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 03:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4yrK-0008FC-GV for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 03:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q4yrK-00087O-B8 for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 03:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Jun 2023 07:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63469 X-GNU-PR-Package: emacs Original-Received: via spool by 63469-submit@debbugs.gnu.org id=B63469.168568953131109 (code B ref 63469); Fri, 02 Jun 2023 07:06:02 +0000 Original-Received: (at 63469) by debbugs.gnu.org; 2 Jun 2023 07:05:31 +0000 Original-Received: from localhost ([127.0.0.1]:39005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4yqo-00085h-Lv for submit@debbugs.gnu.org; Fri, 02 Jun 2023 03:05:31 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:58177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4yqm-00085R-9h for 63469@debbugs.gnu.org; Fri, 02 Jun 2023 03:05:29 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 8ED1760009; Fri, 2 Jun 2023 07:05:21 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Fri, 2 Jun 2023 05:11:32 +0300") 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:262739 Archived-At: >>>> But not sure about your patch >>>> since currently I have no idea how to verify its performance. >>>> Maybe it should be pushed to master so that everyone can test it? >>> I think the performance requirements for 'project-name' are currently >>> rather modest: the name is only used when selecting the project (in >>> a custom config) and when generating some buffer names. For that, the new >>> logic should be fine. >>> >>> With your feature, however, project-name could be called during redisplay, >>> and that might require better performance. So I thought you would test it >>> together with the patch for your feature request. >>> >>> But I suppose if you're not working on it right this moment, I could push >>> the patch to emacs-29, and then we could refine the performance (if >>> necessary) on master. >> I don't know when I'll finish the feature of displaying a project name >> on the mode-line. So maybe better to push your patch to emacs-29 now? > > All right, pushed now. Thanks for reporting this. Sorry that I noticed this only now, but would such optimization make sense? Instead of (cl-defmethod project-name ((project (head vc))) (or (project--value-in-dir 'project-vc-name (project-root project)) (cl-call-next-method))) first check if .dir-local.el already assigned a buffer-local value before trying to get it from the root: (cl-defmethod project-name ((project (head vc))) (or project-vc-name (project--value-in-dir 'project-vc-name (project-root project)) (cl-call-next-method)))