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: Sun, 03 Oct 2021 20:54:47 +0300 Message-ID: <87zgrq3sew.fsf@mail.linkov.net> References: <76FA3F83D086455EAA01FF0FB000FCDB@us.oracle.com> <871r6hk99k.fsf@gnus.org> <87bl5k2ug1.fsf@gnus.org> <87czpwb4gw.fsf@mail.linkov.net> <87y28kf5sn.fsf@gnus.org> <87r1ebz98c.fsf@mail.linkov.net> <875yvm8oqk.fsf@gnus.org> <87v93mazvm.fsf@mail.linkov.net> <875yvmj9ir.fsf@gnus.org> <87pmsqeena.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8510"; 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 Sun Oct 03 19:57:27 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 1mX5jr-0001zi-47 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 19:57:27 +0200 Original-Received: from localhost ([::1]:36702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX5jp-0001kY-N1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 13:57:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX5jS-00018l-Oz for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX5jS-0002Tu-I0 for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX5jS-0006Uz-HZ for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:57:02 -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, 03 Oct 2021 17:57: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.163328381724964 (code B ref 9923); Sun, 03 Oct 2021 17:57:02 +0000 Original-Received: (at 9923) by debbugs.gnu.org; 3 Oct 2021 17:56:57 +0000 Original-Received: from localhost ([127.0.0.1]:34891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5jN-0006UZ-2G for submit@debbugs.gnu.org; Sun, 03 Oct 2021 13:56:57 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5jK-0006U9-VS for 9923@debbugs.gnu.org; Sun, 03 Oct 2021 13:56:56 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9938660002; Sun, 3 Oct 2021 17:56:46 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Thu, 30 Sep 2021 08:43:21 -0400") 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:216291 Archived-At: --=-=-= Content-Type: text/plain > So maybe we should add an `with-demoted-errors` and just mention > context-menu as an example of the kind of errors we want to disregard. Another case that I posted earlier was where-is-internal failing in help-fns--list-local-commands because of context-menu errors. So maybe with-demoted-errors could be added to both? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=where-is-internal-with-demoted-errors.patch diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 6be5cd4a50..ef4eb447a5 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1950,7 +1950,9 @@ help-fns--list-local-commands ;; Ignore aliases. (not (symbolp (symbol-function sym))) ;; Ignore everything bound. - (not (where-is-internal sym nil t)) + (not (with-demoted-errors + ;; Ignore errors in context-menu. + (where-is-internal sym nil t))) (apply #'derived-mode-p (command-modes sym))) (push sym functions)))) (with-temp-buffer diff --git a/lisp/simple.el b/lisp/simple.el index 3695415163..d90fd7efdf 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2120,7 +2120,9 @@ read-extended-command--affixation (mapcar (lambda (command-name) (let* ((fun (and (stringp command-name) (intern-soft command-name))) - (binding (where-is-internal fun overriding-local-map t)) + (binding (with-demoted-errors + ;; Ignore errors in context-menu. + (where-is-internal fun overriding-local-map t))) (obsolete (get fun 'byte-obsolete-info)) (alias (symbol-function fun)) (suffix (cond ((symbolp alias) --=-=-=--