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: Mon, 22 May 2023 22:59:50 +0300 Message-ID: <63854a1a-8178-d039-288c-34b1e67e5b06@gutov.dev> References: <834jod1lvc.fsf@gnu.org> <83o7mkz2ap.fsf@gnu.org> <83sfbvxkj3.fsf@gnu.org> <3d97111e-794d-eeef-73b0-ee3f6f5f15d5@gutov.dev> <83jzx6w2bg.fsf@gnu.org> <6a3eed52-3248-74f9-bcaf-bf12660ae0ed@gutov.dev> <83h6savsz4.fsf@gnu.org> <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> 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="9130"; 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, 63469@debbugs.gnu.org To: Juri Linkov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 22 22:00:17 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 1q1BhV-00024H-T4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 May 2023 22:00:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1BhM-00070a-Nx; Mon, 22 May 2023 16:00: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 1q1BhL-00070D-94 for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 16:00:03 -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 1q1BhK-0007TQ-Ue for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 16:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1BhK-0007BQ-PH for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 16:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2023 20:00: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.168478560027575 (code B ref 63469); Mon, 22 May 2023 20:00:02 +0000 Original-Received: (at 63469) by debbugs.gnu.org; 22 May 2023 20:00:00 +0000 Original-Received: from localhost ([127.0.0.1]:36835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1BhI-0007Ah-1q for submit@debbugs.gnu.org; Mon, 22 May 2023 16:00:00 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:50029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1BhG-0007AS-3z for 63469@debbugs.gnu.org; Mon, 22 May 2023 15:59:58 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 12A205C00F8; Mon, 22 May 2023 15:59:53 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 22 May 2023 15:59:53 -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= 1684785593; x=1684871993; bh=orkHQfpJV9RUh25dFmkDPJ4fah5A3OcAgh0 zMbcB25w=; b=0DmWidLT96fAU0CJn2gpgVyT8KI3016PGh61NM9xGHF6JqHAh0u dOOrhYUX0di9HV/G8S7exNiOIGhEUEYilHQwf07EanGyBG8fDy9i7bBPIkAgn0CS 2UJbDJ+53owNe2Hxp9D3572672NwRBbVism73y9wd58mFwooag2jDAcXqcjmAcZJ TXFk90PraZPnYt7rEI6jjlb34ToRZn9AMGulECS8tAfwYPRBv95pcOa75IsgV4iY AvsfRqbNPbGYgE5ZUZWeoUvN/VF7XhnuSt9H5uTMxTPz9xMeMbKKisBIZ5NocxFG PWT8+MrsCU76cyeqA63eJAbOYcEjDvTFI5Q== 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= 1684785593; x=1684871993; bh=orkHQfpJV9RUh25dFmkDPJ4fah5A3OcAgh0 zMbcB25w=; b=r5cSKJK/WunclR3+8mM03iqRYLktB8e25Uff9D5GTBu3tID8YQF raF1i3Qnr08/zfKbMaaH/5ml6TVmGtGauEjQa6cNuSF4g+k8rS+FLBp0z6rkQtVq P3wqL2o2EdTvbDeTf8XqM5djgj9vnCuTRw5c70kfG2w4IE6BHTwh1sIy2pd7t9qa VLzRRJwwkV25ApISC0+9fVFsHN6tMCf5IXU5l/GR3TndJsmwO1eLjRTUSghESrmT /vZvpVj48IO+hrosLA0mB5Lx558/MfNDLWGC3fC/rmKwExHPn5+aQQwfdRjVDrKi 8vwExV3908EPeJXdeMCX03da8+IQ6W8/Q0A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejuddgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 May 2023 15:59:51 -0400 (EDT) Content-Language: en-US In-Reply-To: <86o7mccl5z.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:262190 Archived-At: On 22/05/2023 20:48, Juri Linkov wrote: > +;;;###autoload > +(define-minor-mode project-mode > + "Toggle display of project menu in the project-aware buffers." > + (if project-mode > + (setq-local project-name (concat > + " " > + (propertize > + (project-name (project-current)) > + 'mouse-face 'mode-line-highlight > + 'local-map project-mode-line-map))))) At the very least, this will need some better name, because project features don't need any mode to be turned on to be used. project-menu-mode? Next, I'm not quite sure about the caching of project-name. There is no scenario when it will be invalidated, right? Try simply calling (project-name (project-current t)) every time, see how the performance is. Or, more thoroughly, copy the if-let logic from project-prefixed-buffer-name.