From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 05 11:59:20 2024 Received: (at submit) by debbugs.gnu.org; 5 Mar 2024 16:59:20 +0000 Received: from localhost ([127.0.0.1]:48862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhY8O-0001TX-1N for submit@debbugs.gnu.org; Tue, 05 Mar 2024 11:59:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:40990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhY8K-0001TE-7M for submit@debbugs.gnu.org; Tue, 05 Mar 2024 11:59:18 -0500 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 1rhY7p-00037X-Ka for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 11:58:45 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhY7m-0003eH-Sz for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2024 11:58:45 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5E71DFF806 for ; Tue, 5 Mar 2024 16:58:38 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Context menu for project Organization: LINKOV.NET Date: Tue, 05 Mar 2024 18:54:16 +0200 Message-ID: <865xy0mxfr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Tags: patch diff --git a/lisp/mouse.el b/lisp/mouse.el index d1b06c2040d..d5c33828846 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -393,6 +393,7 @@ context-menu-functions (function-item context-menu-local) (function-item context-menu-minor) (function-item context-menu-buffers) + (function-item context-menu-project) (function-item context-menu-vc) (function-item context-menu-ffap) (function-item hi-lock-context-menu) @@ -527,6 +534,12 @@ context-menu-buffers (mouse-buffer-menu-keymap)) menu) +(defun context-menu-project (menu _click) + "Populate MENU with project commands." + (define-key-after menu [separator-project] menu-bar-separator) + (define-key-after menu [project-menu] (bound-and-true-p project-menu-entry)) + menu) + (defun context-menu-vc (menu _click) "Populate MENU with Version Control commands." (define-key-after menu [separator-vc] menu-bar-separator) From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 17:58:36 2024 Received: (at 69566) by debbugs.gnu.org; 8 Mar 2024 22:58:36 +0000 Received: from localhost ([127.0.0.1]:59914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rijAh-0004eU-Rk for submit@debbugs.gnu.org; Fri, 08 Mar 2024 17:58:36 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:35607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rijAf-0004eG-R5 for 69566@debbugs.gnu.org; Fri, 08 Mar 2024 17:58:34 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C2E8D32002E2; Fri, 8 Mar 2024 17:57:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 Mar 2024 17:57:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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:subject:subject:to:to; s=fm3; t=1709938675; x=1710025075; bh=/OlW+2btDue4Imisg3pJc632Ji/hkqEWqL0wRQLah0Y=; b= Sq4+IppT31665LS0vzSN3KL7NTK0CYHOBqlW+5qB0AqCpGouGevTbabU9nBg9BGI 0nkgLJVCYspG3Sr9JaajKo+AjSQZQIXeH4YQIh0eYvhMxb/BOO4XMMNMGE8VpCM/ IPItVulmqal93GC1QLY6hYRAOI8ZFjoEhKglE/Qk9LbB0UO48jvQxyy6+GHctSXA ETUCvCi/jmdWckqV08QjwA8Id5lLoZ4DLu27rCjsHSlJmAIwswZGyOZ0Z2Mwmly8 NwMEI2LXHvaK2NLdTXxTLdfFqJ05WzAghGDJq2dJNPAN766VlklRReQx1AFSRFOt f5hgcOOQaWn5o+PMseJ3kw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709938675; x= 1710025075; bh=/OlW+2btDue4Imisg3pJc632Ji/hkqEWqL0wRQLah0Y=; b=A i+5hCWebhW6/Q9SXPyShtzvpCTuOInN+40Ojqr0P1Zq0mzt8k3tVOlbtOCf/Xe6W 5dzQjmN6IUgn2gru6inC359OeNhk1rSBz5aXGkoWwtGVvq1hyQ6u5NO5PebLcGFN nuRdopY9yqZF2qojI0Fxv9Fj2P4tsRtwtIXtZNGEnPOJu3jLOsrs4XoHWxGqWNIW TQP5miSR9OTcSweJPaTxB8NK/otu7pk9u9K+XchZCxdWoJLiH0bQeDI9bJIP0SE9 YZ97tybEreQFssSR0cTU7Gtf8hBdWfErxdFmpaKom7WdhX4DKI51ACT6DTSnLvSu OFEEd6X85Dp/xVGfEm1yA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieeigddtfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnheptdfhuedvtdevleegueelvedvjeevheffveevhedvuefftdefhfdvueeggfetgfdt necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Mar 2024 17:57:54 -0500 (EST) Message-ID: Date: Sat, 9 Mar 2024 00:57:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69566: Context menu for project Content-Language: en-US To: Juri Linkov , 69566@debbugs.gnu.org References: <865xy0mxfr.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <865xy0mxfr.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69566 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 05/03/2024 18:54, Juri Linkov wrote: > + (define-key-after menu [project-menu] (bound-and-true-p project-menu-entry)) This variable will probably always be bound (and likely non-nil), given than mouse.el is never distributed separately or used with older versions of Emacs. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 18:01:03 2024 Received: (at 69566) by debbugs.gnu.org; 8 Mar 2024 23:01:03 +0000 Received: from localhost ([127.0.0.1]:59919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rijD5-0004js-Cg for submit@debbugs.gnu.org; Fri, 08 Mar 2024 18:01:03 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:55033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rijD3-0004jH-OZ for 69566@debbugs.gnu.org; Fri, 08 Mar 2024 18:01:02 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id B19A532002E8; Fri, 8 Mar 2024 18:00:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 08 Mar 2024 18:00:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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:subject:subject:to:to; s=fm3; t=1709938823; x=1710025223; bh=ue7nQ72RLDk/keANdSa9K/WWhMH9MdGqeXe1fLtLaTo=; b= RzAgBIaj2xhSIEpC41CWJuR61WTbEwhyObMPoRsePkvlzOarl/+fjT+woeWQk/FY g7UlqKNeb7Wi8J7zqnb7od0R3UUWWF4+LfGEO6FwsyfniNM8SZdhTQBbsa+RTi4O ZdTJ9wWFeQsut3W667kErUKFbfNwdqVR4L/DooOz51YOAcE8ZjqzXz9jAe1MTZEy Z+2uu2apkGMWWLJum+yoWtN8bDf3fcgyRS5Cxpy7sU/TNgu8zaYoVopnv9yu4DJL w2ObRIGvnClldcOQICkq/G7I17JnEItczSgjq3yE89EB5/Zmu+TKgV90/FJysc9N h77UE4IzB0H57Qp8ot4yOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709938823; x= 1710025223; bh=ue7nQ72RLDk/keANdSa9K/WWhMH9MdGqeXe1fLtLaTo=; b=Z 9xz/uFBEynmnwHOEZ/N0lR0XUL/Dnz07h/UqRXdVOYc9fWTFFZuw07ACxflWAGyD 5tMnOwtlzewMOjcivhUHsdfecSVmuqeRK0WthJhPkw5hgFM+4idNhQN8C09wjzOh ntE/cz1l3oA83exgh4Ub2DW9lQadwXLAKIVQfxmt9vDeGWzgBM0n/aivzjdE5aIF SSwaT6Rn/+BUi0e9gqk6Aw9fdFWhBihnLK6MTP/b3YOpUixNsS8yT6dlZecSxadZ 4X09OSNhPa3E2rf9MAQyAjCt9q9Kn4r/PC3sncmh93KKSdbJH3wWzIYuuxAC3Ebg bPyBUTXXCwbSRdZOKrTqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieeigddthecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuhffvfhgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnhepieelvefhhfdvheevudeludehieeikeeftedvgfeludfgheduieekgfduffejffei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Mar 2024 18:00:22 -0500 (EST) Message-ID: <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> Date: Sat, 9 Mar 2024 01:00:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69566: Context menu for project Content-Language: en-US From: Dmitry Gutov To: Juri Linkov , 69566@debbugs.gnu.org References: <865xy0mxfr.fsf@mail.linkov.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69566 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 09/03/2024 00:57, Dmitry Gutov wrote: > On 05/03/2024 18:54, Juri Linkov wrote: >> +  (define-key-after menu [project-menu] (bound-and-true-p >> project-menu-entry)) > > This variable will probably always be bound (and likely non-nil), given > than mouse.el is never distributed separately or used with older > versions of Emacs. Ah, I guess you might be handling the case when project is not loaded yet. Perhaps we should autoload something, so that its commands are in the context menu anyway? You could even copy the variable's definition to mouse.el, if that's easier. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 13:33:46 2024 Received: (at 69566) by debbugs.gnu.org; 10 Mar 2024 17:33:46 +0000 Received: from localhost ([127.0.0.1]:37818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjN3S-00087E-Ad for submit@debbugs.gnu.org; Sun, 10 Mar 2024 13:33:46 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:53819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjN3Q-000871-PP for 69566@debbugs.gnu.org; Sun, 10 Mar 2024 13:33:45 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 688B0FF802; Sun, 10 Mar 2024 17:32:44 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#69566: Context menu for project In-Reply-To: <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> (Dmitry Gutov's message of "Sat, 9 Mar 2024 01:00:20 +0200") Organization: LINKOV.NET References: <865xy0mxfr.fsf@mail.linkov.net> <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> Date: Sun, 10 Mar 2024 19:28:43 +0200 Message-ID: <865xxu2ew2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69566 Cc: 69566@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> +  (define-key-after menu [project-menu] (bound-and-true-p >>> project-menu-entry)) >> This variable will probably always be bound (and likely non-nil), given >> than mouse.el is never distributed separately or used with older versions >> of Emacs. > > Ah, I guess you might be handling the case when project is not loaded > yet. Perhaps we should autoload something, so that its commands are in the > context menu anyway? > > You could even copy the variable's definition to mouse.el, if that's easier. Copying it to mouse.el or menu-bar.el makes sense since it will remove another 'bound-and-true-p' from 'menu-bar-project-menu': (defvar project-menu-entry `(menu-item "Project" ,(bound-and-true-p menu-bar-project-menu))) Both mouse.el and menu-bar.el are preloaded. But the problem is that by its name prefix 'project-' it belongs to project.el. Or maybe rename it to 'menu-bar-project-entry'? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 13:53:41 2024 Received: (at 69566) by debbugs.gnu.org; 10 Mar 2024 17:53:41 +0000 Received: from localhost ([127.0.0.1]:37849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjNMj-0000GM-0f for submit@debbugs.gnu.org; Sun, 10 Mar 2024 13:53:41 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjNMg-0000G8-Qm for 69566@debbugs.gnu.org; Sun, 10 Mar 2024 13:53:39 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 115205C0032; Sun, 10 Mar 2024 13:52:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 10 Mar 2024 13:52:59 -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:subject:subject:to:to; s=fm3; t=1710093179; x=1710179579; bh=ndGNDlJ/m+Ta7TmuMyTe6CG8uRS4xSeXuyCq07V7NO8=; b= krt4ValYEO+lwNqCJ67Whsc0E+eOv6LczDO5duolOo+GqYgzsX3K3Pjc0tZT6GH8 uVCvLWQm3rgd9TV1TXBbUkVY3OuH09No80xt2I5h7jGSxXVI9sudvydH1ltn9uln 9Crb0U1j0zEaAKVpt7ti+duMarbpygsONW/k0GYM53ieJ5YhUK6thM/znP3r9Ofb zya0X4KBlcVV9FJRX5P3i9qEIEP4A+AI7xPu2Plit1hV/l0jEOp8ghPekFJ1kyhy 1XF4qaB+DzJe4pwHdRTI95AC2SLLox4NMHW40ns6CIIxeJsa+tEPb1txXpj/aUvj 9rrz1Q1jSlp2JWcwC+Ja9A== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710093179; x= 1710179579; bh=ndGNDlJ/m+Ta7TmuMyTe6CG8uRS4xSeXuyCq07V7NO8=; b=m n1SSrx6EVVSRb36j96qJwG9V1s6ambBF1Qp6GadRF+r4FiKPHMOGXGDNqFE3qAus z3gNWK+WDMGoK5++QHfn5/srdFNxbj1Mllu8A/QtrwgIx8L0WE1CrKDKUB5qq9TG ZJSCFwNjlwTJpn1zf/9dRn4EajYIQiqdCebTsdV7Q+OfuXpyHNSb1LYI/FHGku6w ERKBy24IdIUNODg04OqaKLObxgccoMkIggjTy/q3b64RcoJXFrh8ESbuGbXx8jhI VE2z6JVGypRVtI5oczHK+6JrhtTdYVYfHsitfs3BRZwx3BGrbzpu3EOzIV5uCCqA Z/0MnQK9SdAt27Zp68Zsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieelgddutdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 10 Mar 2024 13:52:57 -0400 (EDT) Message-ID: <1473f7be-6004-48e1-96c2-74b76618a7c2@gutov.dev> Date: Sun, 10 Mar 2024 19:52:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69566: Context menu for project Content-Language: en-US To: Juri Linkov References: <865xy0mxfr.fsf@mail.linkov.net> <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> <865xxu2ew2.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <865xxu2ew2.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69566 Cc: 69566@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 10/03/2024 19:28, Juri Linkov wrote: > But the problem is that by its name prefix 'project-' > it belongs to project.el. Or maybe rename it to > 'menu-bar-project-entry'? Yes, I guess something like that. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 12 13:36:07 2024 Received: (at 69566) by debbugs.gnu.org; 12 Mar 2024 17:36:08 +0000 Received: from localhost ([127.0.0.1]:43735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rk62p-0001yM-Hg for submit@debbugs.gnu.org; Tue, 12 Mar 2024 13:36:07 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:35585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rk62l-0001x3-Ov for 69566@debbugs.gnu.org; Tue, 12 Mar 2024 13:36:06 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4F4AAFF803; Tue, 12 Mar 2024 17:35:01 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#69566: Context menu for project In-Reply-To: <1473f7be-6004-48e1-96c2-74b76618a7c2@gutov.dev> (Dmitry Gutov's message of "Sun, 10 Mar 2024 19:52:55 +0200") Organization: LINKOV.NET References: <865xy0mxfr.fsf@mail.linkov.net> <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> <865xxu2ew2.fsf@mail.linkov.net> <1473f7be-6004-48e1-96c2-74b76618a7c2@gutov.dev> Date: Tue, 12 Mar 2024 19:18:11 +0200 Message-ID: <86y1anpedg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69566 Cc: 69566@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >> But the problem is that by its name prefix 'project-' >> it belongs to project.el. Or maybe rename it to >> 'menu-bar-project-entry'? > > Yes, I guess something like that. Ok, here is with 'menu-bar-project-item': --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=menu-bar-project-item.patch diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 5b290899ff5..320fabb54cf 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1838,6 +1838,9 @@ menu-bar-project-menu (bindings--define-key menu [project-open-file] '(menu-item "Open File..." project-find-file :help "Open an existing file that belongs to current project")) menu)) +(defvar menu-bar-project-item + `(menu-item "Project" ,menu-bar-project-menu)) + (defun menu-bar-read-mail () "Read mail using `read-mail-command'." (interactive) @@ -1925,7 +1928,7 @@ menu-bar-tools-menu :help "Start language server suitable for this buffer's major-mode")) (bindings--define-key menu [project] - `(menu-item "Project" ,menu-bar-project-menu)) + menu-bar-project-item) (bindings--define-key menu [ede] '(menu-item "Project Support (EDE)" diff --git a/lisp/mouse.el b/lisp/mouse.el index 26835437c08..cef88dede8a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -393,6 +393,7 @@ context-menu-functions (function-item context-menu-local) (function-item context-menu-minor) (function-item context-menu-buffers) + (function-item context-menu-project) (function-item context-menu-vc) (function-item context-menu-ffap) (function-item hi-lock-context-menu) @@ -533,6 +534,12 @@ context-menu-buffers (mouse-buffer-menu-keymap)) menu) +(defun context-menu-project (menu _click) + "Populate MENU with project commands." + (define-key-after menu [separator-project] menu-bar-separator) + (define-key-after menu [project-menu] menu-bar-project-item) + menu) + (defun context-menu-vc (menu _click) "Populate MENU with Version Control commands." (define-key-after menu [separator-vc] menu-bar-separator) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9622b1b6768..e2559617c20 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2140,12 +2143,10 @@ project-mode-line :group 'project :version "30.1") -(defvar project-menu-entry - `(menu-item "Project" ,(bound-and-true-p menu-bar-project-menu))) - (defvar project-mode-line-map (let ((map (make-sparse-keymap))) - (define-key map [mode-line down-mouse-1] project-menu-entry) + (define-key map [mode-line down-mouse-1] + (bound-and-true-p menu-bar-project-item)) map)) (defvar project-mode-line-face nil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 13 12:37:33 2024 Received: (at 69566) by debbugs.gnu.org; 13 Mar 2024 16:37:33 +0000 Received: from localhost ([127.0.0.1]:47219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkRbh-0006TI-2U for submit@debbugs.gnu.org; Wed, 13 Mar 2024 12:37:33 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkRbV-0006St-8B for 69566@debbugs.gnu.org; Wed, 13 Mar 2024 12:37:31 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 734E65C0050; Wed, 13 Mar 2024 12:36:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 13 Mar 2024 12:36:40 -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:subject:subject:to:to; s=fm3; t=1710347800; x=1710434200; bh=gq4BqmwrZ1N1NzMwo1v0lfgdB0B2Yc2tI0ybezxHVVI=; b= QPkGx9/yQqa/Xt2ktcpghhv8yozCTH9IvFa2crlMbOPviF1aN/ZqIIpc1memvGx+ uhMo4s68djKzVK2cOyNsvQ/nZoOHPa3Ke3xEOYKQvwabmd3rOemhVHTGagWabroI hop/a+BegnoUMDnzNjwh6fsmbRG/jV0IMnujRjcfb57EhkRp/Xc6rwDcKSdXAbJ9 JNqAkFFB0NEU8/pPLWFXUKQL1G5Gu1yE0ytxTeVR/5VOj1g/nf6O1ytl0dOJ37IB TePgUTCKiKJVFcsqLY8A3+pWmD1AAa2eVVp8G546Pj6EXWvCcbumZ38vZZc/KC7d 3y37ItoMhYJu/siDj770iQ== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710347800; x= 1710434200; bh=gq4BqmwrZ1N1NzMwo1v0lfgdB0B2Yc2tI0ybezxHVVI=; b=a AYvSiupRsSB0ULfFUCCr/b9vyokvfvnvPPJx7pJWMyFCbFcqVqYVOj0fUymUXGko 8nGIsJv49M/MEIxV8bARhOSfrheuH9tJXqH83MFRnB4Al4eIbIhCfpZtnTrybVUw bDVhCcOdaxCdqxsozdnqeJ7g4OGqW+LQYKZx1/58i4CQZ5zh+ayPgA6EUKtm3O6i dvKCG7xr1KJQblKh7P4d5C80WOxH/xA+yxNObSiOPnZow1DrrjFYgVPsiDAtztyM ThBuh3cphRHVEbe78YltSMjJ/uPqi2Z71el87GmdRRJ5Xv0Doi7aM85o7t+oDsfh +g83N526EnjIdbMTXQ4Bg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeehgdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Mar 2024 12:36:39 -0400 (EDT) Message-ID: <878604ce-a604-4824-bbb0-9bfa927950ea@gutov.dev> Date: Wed, 13 Mar 2024 18:36:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69566: Context menu for project Content-Language: en-US To: Juri Linkov References: <865xy0mxfr.fsf@mail.linkov.net> <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> <865xxu2ew2.fsf@mail.linkov.net> <1473f7be-6004-48e1-96c2-74b76618a7c2@gutov.dev> <86y1anpedg.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86y1anpedg.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69566 Cc: 69566@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 12/03/2024 19:18, Juri Linkov wrote: >>> But the problem is that by its name prefix 'project-' >>> it belongs to project.el. Or maybe rename it to >>> 'menu-bar-project-entry'? >> Yes, I guess something like that. > Ok, here is with 'menu-bar-project-item': Looking good, thanks! From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 14 13:31:39 2024 Received: (at 69566) by debbugs.gnu.org; 14 Mar 2024 17:31:39 +0000 Received: from localhost ([127.0.0.1]:50528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkovb-0001UM-9W for submit@debbugs.gnu.org; Thu, 14 Mar 2024 13:31:39 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:39275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkovY-0001U0-DQ; Thu, 14 Mar 2024 13:31:37 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 0549DE0004; Thu, 14 Mar 2024 17:30:32 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#69566: Context menu for project In-Reply-To: <878604ce-a604-4824-bbb0-9bfa927950ea@gutov.dev> (Dmitry Gutov's message of "Wed, 13 Mar 2024 18:36:36 +0200") Organization: LINKOV.NET References: <865xy0mxfr.fsf@mail.linkov.net> <5d0a1570-914b-4763-bb06-6027ee632e1e@gutov.dev> <865xxu2ew2.fsf@mail.linkov.net> <1473f7be-6004-48e1-96c2-74b76618a7c2@gutov.dev> <86y1anpedg.fsf@mail.linkov.net> <878604ce-a604-4824-bbb0-9bfa927950ea@gutov.dev> Date: Thu, 14 Mar 2024 19:29:32 +0200 Message-ID: <861q8crabn.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69566 Cc: 69566@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 69566 30.0.50 thanks >>>> But the problem is that by its name prefix 'project-' >>>> it belongs to project.el. Or maybe rename it to >>>> 'menu-bar-project-entry'? >>> Yes, I guess something like that. >> Ok, here is with 'menu-bar-project-item': > > Looking good, thanks! So now pushed. From unknown Sun Jun 22 00:17:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 12 Apr 2024 11:24:29 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator