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#52973: Adding a few context-menu-mode commands Date: Sat, 08 Jan 2022 22:09:44 +0200 Message-ID: <83o84m2dmf.fsf@gnu.org> 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> <83v8yu2hkq.fsf@gnu.org> <875yqu59wl.fsf@posteo.net> <83r19i2gcu.fsf@gnu.org> <87r19i3tky.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23739"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 52973@debbugs.gnu.org, juri@linkov.net To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 08 21:11:24 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 1n6I3g-00060U-34 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jan 2022 21:11:24 +0100 Original-Received: from localhost ([::1]:52010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6I3e-0000mI-5j for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jan 2022 15:11:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6I3L-0000jZ-Ga for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2022 15:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6I3J-00048j-RG for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2022 15:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n6I3J-0004Qf-MX for bug-gnu-emacs@gnu.org; Sat, 08 Jan 2022 15:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jan 2022 20:11:01 +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.164167261116934 (code B ref 52973); Sat, 08 Jan 2022 20:11:01 +0000 Original-Received: (at 52973) by debbugs.gnu.org; 8 Jan 2022 20:10:11 +0000 Original-Received: from localhost ([127.0.0.1]:48764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n6I2V-0004P4-6f for submit@debbugs.gnu.org; Sat, 08 Jan 2022 15:10:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n6I2Q-0004ON-8A for 52973@debbugs.gnu.org; Sat, 08 Jan 2022 15:10:10 -0500 Original-Received: from [2001:470:142:3::e] (port=38498 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6I2K-0003pH-NN; Sat, 08 Jan 2022 15:10:00 -0500 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=nxCJ2aoiQez0T9R3nCBlYWbNGO6mgjXIXSmBhwlBA2g=; b=Otzj/7lIcM0U WC5c+/61ZsFZTs+tsVzcwpcKgQQNV30lR7Mm+KzRpVgSfsyk3pipPDrmowQ31rNozib0YEdHbWmJp fFN0d8PdhL4rmryy9JIeHqv7wuLv8jzOLhYG53jjZcazFi5foaTzFIWa1JLAgR+CvJxwHJLY4fJdc aWqP7H4oDlHL4DngK5aCS4CUsX9I8fGoXHUwPFDHPM/M0BdfQTBdplMa29cfItUQFaWzaDBECw5LC bC6QDjV9zWnnpoDITHBWm24GOJrBXDeGjXUShcoP8xehF+RSwCG24KldHROVYdbyFCa8R1NZpvHaQ zerTcnLgnj6hYqmLzJ0Qdg==; Original-Received: from [87.69.77.57] (port=2309 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 1n6I2K-0001Nx-NF; Sat, 08 Jan 2022 15:10:01 -0500 In-Reply-To: <87r19i3tky.fsf@posteo.net> (message from Philip Kaludercic on Sat, 08 Jan 2022 19:39:41 +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:223827 Archived-At: > From: Philip Kaludercic > Cc: juri@linkov.net, larsi@gnus.org, 52973@debbugs.gnu.org > Date: Sat, 08 Jan 2022 19:39:41 +0000 > > >> No, the Man functions can be used anywhere you want to read a man page. > >> It checks if the user clicked on something like "emacs(1)", then inserts > >> a entry into the context menu to open the man page at point. > > > > So it will suggest to show a man page when text like this one from the > > ELisp manual is displayed: > > > > To conserve memory, Emacs does not hold fixed-length 22-bit numbers > > that are codepoints of text characters within buffers and strings. > > Rather, Emacs uses a variable-length internal representation of > > characters, that stores each character as a sequence of 1 to 5 8-bit > > bytes, depending on the magnitude of its codepoint(1). > > > > When the user displays a man page, the probability that "foo(1)" > > references a man page is very high. > > Yes, but in that case Man-mode should have already inserted a link that > you can just click on, without the need for a context-menu. So let me step back a notch and ask: how else can we cause the context menus to be automatically populated in a given buffer, once context-menu-mode is turned on? It must be some buffer-local feature, because different buffers should in principle show different context menus. That's why I thought about modes -- those are always buffer-local, and mode initialization code runs in every buffer where the mode is turned on, so we have a place to produce the context menus. If you want to have context menus populated regardless of the modes, what other buffer-specific mechanism can we employ? IOW, what would be the trigger for populating the context menus? It cannot be the user, because that makes no sense to me: the user already told us he/she wants those menus when he/she turned on the context-menu-mode.