From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#63469: 29.0.90; project.el doesn't add menu-bar entries Date: Sat, 3 Jun 2023 04:36:25 +0300 Message-ID: <3c9eb077-fb0f-161a-9c0b-3a647a634ccf@gutov.dev> 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> <86o7lyxugp.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16585"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cc: sbaugh@janestreet.com, Eli Zaretskii , 63469@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 03:37:22 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 1q5GCn-0004BM-7M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 03:37:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5GCW-00032Z-VQ; Fri, 02 Jun 2023 21:37:05 -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 1q5GCU-000329-34 for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 21:37: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 1q5GCT-0003xF-Qh for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 21:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5GCT-0006X0-Ng for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 21:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2023 01:37:01 +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.168575619725065 (code B ref 63469); Sat, 03 Jun 2023 01:37:01 +0000 Original-Received: (at 63469) by debbugs.gnu.org; 3 Jun 2023 01:36:37 +0000 Original-Received: from localhost ([127.0.0.1]:41085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5GC4-0006WC-Kb for submit@debbugs.gnu.org; Fri, 02 Jun 2023 21:36:36 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:52765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5GC2-0006Vx-QJ for 63469@debbugs.gnu.org; Fri, 02 Jun 2023 21:36:35 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E17C0320095E; Fri, 2 Jun 2023 21:36:28 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 02 Jun 2023 21:36:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1685756188; x=1685842588; bh=aEYNqAxaHXBSZN9847YmtSuCoAdpUOhPlqU b5YAEPCY=; b=03Qv+JVL6RFf/DTHlgEGyq3emI/2UBYvqvR09SkEBuG0QPxE0u7 OCpRLMe2ujFTTCHq/f84OwMM4y9F5hTs+Gj9D6h1p4bS7K3va+CXWR4Zwr8TFAF6 6Ku1Mb04xSymHm8Xyz0wMi6ogptg0VnFixMlMMF8WewOEBWSWP7QgwZZT83hVNjy 4chGuUbEh2A2KKfV/4j37DuJF+yplx4z/+ecvYSVz8fPDw3hcxKw0JLnB3ViEbMW 7ayYs3sYQgqXobHV+tJtFZEJyOJJnSKjoJYOcZUYKAVWSizbWtBUiOfz9W92/1AX K/nkiW+fFz7Oyr7ZwyaWhhYWFmiP68oKRow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1685756188; x=1685842588; bh=aEYNqAxaHXBSZN9847YmtSuCoAdpUOhPlqU b5YAEPCY=; b=rSyUhdwA4G4vHnGXktRNSiiTeuiJrOyPLZ8+GKK/1Dtib5DMvUi 66Vx2QdgtvZDQu13Y0/dPxBCpkm0g1kbyIfmYOMeiIEzomiFddxBO/XYNkHBQva2 6kR/Y2CwjW2t1rKZxakJC4Am/V1O/7Q8Ft0H0yuPgFxmcrF6G/lQ2VRlS7ht445u NKEP7ALXffjlJ4BLqtTKtRh7+/pl9ykeFntx0wJTYDCrrFf28dKEA9Rp2yZZbIfg uDqMy+1ulaN/9nI4QUR84iFwjHnBptFRTX7xcTJheHJcukdpM5fADcFIu0fvRsrm Jo6ERXkuCDVEftZ6j7uK++Uqhw/agI+WNKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelgedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Jun 2023 21:36:27 -0400 (EDT) Content-Language: en-US In-Reply-To: <86o7lyxugp.fsf@mail.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:262791 Archived-At: On 02/06/2023 09:37, Juri Linkov wrote: > 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))) It might, but this way you lose one of the niceties of relying on 'project--value-in-dir': an edit to .dir-locals.el takes effect automatically in all related buffers, without having to revert them. It might not be too important, of course. Another thing, though, is that will do nothing about the worst case: when project-vc-name has not been customized or set locally. So if project--value-in-dir doesn't work fast enough for some particular purpose (such as using project name in the mode-line), it will remain a problem for many buffers anyway.