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: Thu, 15 Dec 2022 20:28:31 +0200 Organization: LINKOV.NET Message-ID: <86bko47c8g.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> <8635n613xt.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="3232"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.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 Thu Dec 15 19:30:11 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 1p5szj-0000h6-Sf for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 19:30:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5szc-0002pp-PO; Thu, 15 Dec 2022 13:30:04 -0500 Original-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 1p5szb-0002pa-5m for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 13:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5sza-0001SI-Im for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 13:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5sza-00088U-CH for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 13:30: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: Thu, 15 Dec 2022 18:30:02 +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.167112897431240 (code B ref 9923); Thu, 15 Dec 2022 18:30:02 +0000 Original-Received: (at 9923) by debbugs.gnu.org; 15 Dec 2022 18:29:34 +0000 Original-Received: from localhost ([127.0.0.1]:44201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5sz8-00087o-5e for submit@debbugs.gnu.org; Thu, 15 Dec 2022 13:29:34 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:47555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5sz4-00087e-NO for 9923@debbugs.gnu.org; Thu, 15 Dec 2022 13:29:32 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id CB82FFF80A; Thu, 15 Dec 2022 18:29:21 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Mon, 06 Dec 2021 08:50:49 -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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251134 Archived-At: > Hmm... taking a second look at the `mouse.el` file, I think the problem > is rather than the menu-item has an nominal/default/static binding of > `ignore`. So I guess the `:filter` isn't run to try and look for > `ignore` in the dynamically-generated map but instead it's run later > (when `where-is-internal` checks that the binding it found is real). > > So maybe another way to avoid running the filter is with the > patch below. > > diff --git a/lisp/mouse.el b/lisp/mouse.el > index 5c645a4b895..9e902ca25e0 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el > @@ -513,7 +513,7 @@ context-menu-ffap > menu) > > (defvar context-menu-entry > - `(menu-item ,(purecopy "Context Menu") ignore > + `(menu-item ,(purecopy "Context Menu") ,(make-sparse-keymap) > :filter (lambda (_) (context-menu-map))) > "Menu item that creates the context menu and can be bound to a mouse key.") `where-is-internal(ignore)` raises its ugly head again: 0. emacs -Q 1. M-x TAB Debugger entered--Lisp error: (void-function cl--set-substring) cl--set-substring(#("*scratch* x" 0 9 ... tab-bar-auto-width(((sep-1 menu-item " " ignore) (current-tab menu-item #("*scratch* x" 0 9 ... tab-bar-make-keymap-1() tab-bar-make-keymap(ignore) where-is-internal(ignore nil t) read-extended-command--affixation((#("2C-associate-buffer" ... #f(compiled-function (window) ... window--display-buffer(# ... display-buffer-at-bottom(# ... display-buffer(# ... temp-buffer-window-show(# ... minibuffer-completion-help(5 5) completion--do-completion(5 5) completion--in-region-1(5 5) completion--in-region(5 5 #f(compiled-function (string pred action) .. completion-in-region(5 5 #f(compiled-function (string pred action) ... minibuffer-complete() funcall-interactively(minibuffer-complete) call-interactively(minibuffer-complete nil nil) command-execute(minibuffer-complete) completing-read-default("M-x " ... completing-read("M-x " ... read-extended-command-1("M-x " nil) read-extended-command() call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) But using `make-sparse-keymap` fixes it again: ``` diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 1baa857e9e9..f040bc9786d 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -416,7 +416,7 @@ tab-bar-map "S-" #'tab-bar-move-tab) (global-set-key [tab-bar] - `(menu-item ,(purecopy "tab bar") ignore + `(menu-item ,(purecopy "tab bar") ,(make-sparse-keymap) :filter tab-bar-make-keymap)) ``` Not sure if this trick should be documented somewhere.