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#50552: 28.0.50; Add context-menu-occur Date: Sun, 12 Sep 2021 20:59:06 +0300 Organization: LINKOV.NET Message-ID: <87o88xu13p.fsf@mail.linkov.net> References: <87ilz5d9a1.fsf@posteo.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="7090"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 50552@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 12 20:18:17 2021 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 1mPU3T-0001kw-Sy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 20:18:15 +0200 Original-Received: from localhost ([::1]:44346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPU3S-0008Sf-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 14:18:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPU3G-0008SR-1D for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 14:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60228) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPU3F-0003mK-Ps for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 14:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPU3F-00056A-Jz for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 14:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Sep 2021 18:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50552 X-GNU-PR-Package: emacs Original-Received: via spool by 50552-submit@debbugs.gnu.org id=B50552.163147063619517 (code B ref 50552); Sun, 12 Sep 2021 18:18:01 +0000 Original-Received: (at 50552) by debbugs.gnu.org; 12 Sep 2021 18:17:16 +0000 Original-Received: from localhost ([127.0.0.1]:43541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPU2W-00054j-Fp for submit@debbugs.gnu.org; Sun, 12 Sep 2021 14:17:16 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:47377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPU2S-00054N-Ua for 50552@debbugs.gnu.org; Sun, 12 Sep 2021 14:17:16 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id EF333C0007; Sun, 12 Sep 2021 18:17:05 +0000 (UTC) In-Reply-To: <87ilz5d9a1.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 12 Sep 2021 16:54:30 +0000") 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" Xref: news.gmane.io gmane.emacs.bugs:214154 Archived-At: > the below patch adds the commands occur-word-at-mouse and > occur-symbol-at-mouse, and a function for context-menu-mode to occur > words or symbols where the context menu was invoked. > > Would there be any interest in adding such a functionality? Thanks. There is a new function 'thing-at-mouse' with a new arg 'click' added today that you can use instead of 'thing-at-point'. You can see an example in lisp/net/dictionary.el. > diff --git a/lisp/mouse.el b/lisp/mouse.el > index 7d3ed9a0e4..3590e27e3e 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el >[...] > +(defun context-menu-occur (menu) The default set of context menus in mouse.el contains only menus created from the existing non-context menus. All new context menus should be added to their respective packages. So please move context-menu-occur to replace.el. Another example prog-context-menu in lisp/progmodes/prog-mode.el also demonstrates how context menus should belong to the package where they are used. And prog-context-menu is similar to context-menu-occur, so it should have the name prefix of the package: occur-context-menu.