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#52973: Adding a few context-menu-mode commands Date: Wed, 12 Jan 2022 19:16:22 +0200 Organization: LINKOV.NET Message-ID: <86ilupt0d1.fsf@mail.linkov.net> References: <87o84tp69h.fsf@posteo.net> <868rvwsezi.fsf@mail.linkov.net> <87czl75lyz.fsf@posteo.net> <86czl6au29.fsf@mail.linkov.net> <874k6idjod.fsf@posteo.net> <86o84pthgp.fsf@mail.linkov.net> <87pmp4lmfz.fsf@posteo.net> <86pmp41vby.fsf@mail.linkov.net> <83czl47ghd.fsf@gnu.org> <86ee5kzjo2.fsf@mail.linkov.net> <83bl0o6oei.fsf@gnu.org> <87iluwkkyn.fsf@posteo.net> <83k0fc54bd.fsf@gnu.org> <86bl0m13o1.fsf@mail.linkov.net> <87czkxbhsb.fsf@gnus.org> <83sftt5c99.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2511"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 52973@debbugs.gnu.org, philipk@posteo.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 12 18:36:53 2022 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 1n7hYK-0000VH-8A for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jan 2022 18:36:52 +0100 Original-Received: from localhost ([::1]:36034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7hYI-00079u-VE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jan 2022 12:36:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7hPm-0007aF-Hg for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 12:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7hPm-0007yt-71 for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 12:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7hPm-0008G1-4B for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 12:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2022 17:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52973-submit@debbugs.gnu.org id=B52973.164200844231659 (code B ref 52973); Wed, 12 Jan 2022 17:28:02 +0000 Original-Received: (at 52973) by debbugs.gnu.org; 12 Jan 2022 17:27:22 +0000 Original-Received: from localhost ([127.0.0.1]:58917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7hP7-0008EX-Pr for submit@debbugs.gnu.org; Wed, 12 Jan 2022 12:27:21 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:55397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7hP6-0008EI-RJ for 52973@debbugs.gnu.org; Wed, 12 Jan 2022 12:27:21 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 8FDEA20007; Wed, 12 Jan 2022 17:27:12 +0000 (UTC) In-Reply-To: <83sftt5c99.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Jan 2022 15:12:18 +0200") 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:224011 Archived-At: >> Ah, I see. I misunderstood how the context menu machinery works -- I >> thought it contained mode-specific stuff, and in addition, things that >> are relevant at the point. That is, if you're over a text like >> "foo(1)", then there'd be a predicate to say that this might be a >> manual reference, and then you'd get the Man context menu. > > How do we make sure stuff like "foo(1)" doesn't cause a lot of false > positives when applied in modes whose idea of what that means is very > different from Man-mode? For example, today while editing a shell script I needed to consult the man page about the arguments of the command `zenity` used in the script. It takes too many keystrokes to type `M-x man RET zenity RET' or first to move point to this command, then to type `M-x man RET RET'. With the context menu, it's just one click: press the right mouse button on the command name, select the item "Open man page", and release the mouse button. As you can see, there is no special syntax "foo(1)" used in the script. The context menu item "Open man page" might be useful on any word that can show a man page for any command or function. This means that the item "Open man page" can't be added to the context menu by default, because it makes no sense most of the time. But when a user can tolerate this mostly useless menu item, then the user could customize the context-menu-functions and add the item that is used occasionally.