From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63469: 29.0.90; project.el doesn't add menu-bar entries Date: Fri, 19 May 2023 13:44:39 +0300 Message-ID: <83r0rctxbc.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19114"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 63469@debbugs.gnu.org, sbaugh@janestreet.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 19 12:45: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 1pzxbt-0004iZ-03 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 May 2023 12:45:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzxbc-0000At-HN; Fri, 19 May 2023 06:45: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 1pzxbb-0000Aj-3E for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 06:45: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 1pzxba-0004kr-R3 for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 06:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzxba-0001xt-7m for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 06:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 10:45: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.16844930747495 (code B ref 63469); Fri, 19 May 2023 10:45:02 +0000 Original-Received: (at 63469) by debbugs.gnu.org; 19 May 2023 10:44:34 +0000 Original-Received: from localhost ([127.0.0.1]:55498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzxb7-0001wp-Gj for submit@debbugs.gnu.org; Fri, 19 May 2023 06:44:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzxb6-0001wY-8T for 63469@debbugs.gnu.org; Fri, 19 May 2023 06:44:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzxaz-0004iN-V5; Fri, 19 May 2023 06:44:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dJJtbsZva4eNBz7volQIMIFluULE/LAk3metxWD0FAY=; b=RJjb/M3PBAnO ov12873TaU/7jzdtmBAkw5s+frkFB7VOxHAJlsra8996D/NvfAvjep0+fXGLn2aX9XD+XLkfavbh2 TtA5OthQdv2243HkmZnJ5LPQmhrBzLaw/cyZfuf70MNaagfJjBguRqaOpkNLWn0N1vrYdlqJAmAFJ SfFSThThyr2KzRS4saO00NrApzlrB8H8L+lZrUvSZyKlRgwaQMj2KYsaMURLIr34wPdN7CpLzb2OP 7FAq8uC9zOwVaM+Xrqdkbd0/hqeW4gxAQUkJmbb2dPrUMWft+LgbjLLaB5/zM/oV66Ymcm6uc2bUW tCyRznWo829d67F50/QDbw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzxaz-0006jC-2o; Fri, 19 May 2023 06:44:25 -0400 In-Reply-To: <86ilco7qbs.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 19 May 2023 09:56:31 +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:261993 Archived-At: > From: Juri Linkov > Cc: Eli Zaretskii , Spencer Baugh , > 63469@debbugs.gnu.org > Date: Fri, 19 May 2023 09:56:31 +0300 > > This mode is intended for anyone who wants to show the menu > only in project-supported buffers. To do this, they need to > enable `global-project-mode': > > ```patch > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index 7c51778d5d4..e6dc7aea9ca 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -1883,5 +1883,30 @@ project-switch-project > (let ((project-current-directory-override dir)) > (call-interactively command)))) > > +(easy-menu-define project-mode-menu project-prefix-map > + "Menu for `project-mode' buffers." > + '("Project" > + ["List buffers" project-list-buffers > + :help "List project buffers"] > + ;; ... > + )) > + > +;;;###autoload > +(define-minor-mode project-mode > + "Toggle display of project menu in the project-aware buffers." > + :lighter " Pro" > + :keymap (define-keymap "" project-mode-menu)) If this mode is only for showing the menu, then at least the mode's name should reflect that. And once again: I don't think I see the justification to have a minor mode whose only job is to show a menu-bar menu. I'm not even sure why we need to have a project-mode at all: AFAIU the project.el features are always available, so no mode is needed.