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#9923: 24.0.91; `where-is' does not find recentf menu items (cmds, not files) Date: Mon, 06 Dec 2021 11:28:30 +0200 Organization: LINKOV.NET Message-ID: <8635n613xt.fsf@mail.linkov.net> References: <76FA3F83D086455EAA01FF0FB000FCDB@us.oracle.com> <871r6hk99k.fsf@gnus.org> <87bl5k2ug1.fsf@gnus.org> <87czpwb4gw.fsf@mail.linkov.net> <8635n753o3.fsf@mail.linkov.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="9805"; 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: 9923@debbugs.gnu.org, Lars Ingebrigtsen To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 06 10:40:28 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 1muAU0-0002I3-RT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Dec 2021 10:40:28 +0100 Original-Received: from localhost ([::1]:56236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muATz-0001TG-3m for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Dec 2021 04:40:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muATc-0001Qw-1x for bug-gnu-emacs@gnu.org; Mon, 06 Dec 2021 04:40:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muATb-00005Z-R5 for bug-gnu-emacs@gnu.org; Mon, 06 Dec 2021 04:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1muATb-00069T-Oo for bug-gnu-emacs@gnu.org; Mon, 06 Dec 2021 04:40:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Dec 2021 09:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9923 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 9923-submit@debbugs.gnu.org id=B9923.163878358223544 (code B ref 9923); Mon, 06 Dec 2021 09:40:03 +0000 Original-Received: (at 9923) by debbugs.gnu.org; 6 Dec 2021 09:39:42 +0000 Original-Received: from localhost ([127.0.0.1]:60551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muATG-00067g-6U for submit@debbugs.gnu.org; Mon, 06 Dec 2021 04:39:42 -0500 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:43691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muATE-00067B-Ua for 9923@debbugs.gnu.org; Mon, 06 Dec 2021 04:39:41 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 3A312240002; Mon, 6 Dec 2021 09:39:32 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Sun, 05 Dec 2021 18:13:56 -0500") 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:221732 Archived-At: > I think it would be more "obviously correct" if we switched to > (window-buffer (posn-window (event-end click))) instead. > >> ;; Include text-mode select menu only in strings and comments. >> - (when (nth 8 (save-excursion (syntax-ppss (posn-point (event-end click))))) >> + (when (nth 8 (save-excursion >> + (with-current-buffer (window-buffer) >> + (syntax-ppss (posn-point (event-end click)))))) > > Same here. Will do this if a simpler solution below is not suitable. >> +++ b/lisp/help-fns.el >> @@ -1898,6 +1898,8 @@ help-fns--list-local-commands >> (mapatoms >> (lambda (sym) >> (when (and (commandp sym) >> + ;; Ignore 'ignore'. >> + (not (eq sym 'ignore)) >> ;; Ignore aliases. >> (not (symbolp (symbol-function sym))) >> ;; Ignore everything bound. > > I'm not sure what to think of this because I don't understand > its motivation. IOW at the very least it should come with a comment > explaining why we need to ignore `ignore`. The problem is that `describe-mode` calls `context-menu-map` that it should not do: context-menu-map() (lambda (_) (context-menu-map))(ignore) where-is-internal(ignore nil t) help-fns--list-local-commands() describe-mode() funcall-interactively(describe-mode) call-interactively(describe-mode nil nil) command-execute(describe-mode) `context-menu-map' is bound to `ignore', so ignoring `ignore' will prevent calling it from help-fns--list-local-commands.