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#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Date: Sat, 12 Aug 2023 09:48:33 +0300 Message-ID: <837cq0g3i6.fsf@gnu.org> References: <831qgiuk5g.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24995"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65058@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de To: monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 12 08:49:14 2023 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 1qUiQz-0006FK-7E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Aug 2023 08:49:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUiQp-00041h-LA; Sat, 12 Aug 2023 02:49:03 -0400 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 1qUiQo-00041L-1N for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 02:49:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUiQn-0005wo-PH for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 02:49:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUiQn-0003al-Kr for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 02:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 06:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65058 X-GNU-PR-Package: emacs Original-Received: via spool by 65058-submit@debbugs.gnu.org id=B65058.169182289013717 (code B ref 65058); Sat, 12 Aug 2023 06:49:01 +0000 Original-Received: (at 65058) by debbugs.gnu.org; 12 Aug 2023 06:48:10 +0000 Original-Received: from localhost ([127.0.0.1]:48530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUiPx-0003ZB-Sk for submit@debbugs.gnu.org; Sat, 12 Aug 2023 02:48:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUiPv-0003Yr-MP for 65058@debbugs.gnu.org; Sat, 12 Aug 2023 02:48:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUiPq-0005sU-Bu; Sat, 12 Aug 2023 02:48:02 -0400 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=O3TLF+Q8YbKDWJIzxY3WHqj/Y8wSaEKZzqvITb+5pmA=; b=Kd5xzmEKcONL mA0mpCbkL1vX/kYxY3FtTzbq9dJeURXZB2tpghglEsHVkwKGgc1S55I+xAWsO5Z7Q5BjpznLTWnki MwYCpsJofmb10dguioIrT7TV0Xu4yr87ipm5y+7RKxX8JgpCEQDNbNq8GCWMTcJIoUC+Ax4KAD4CM XutYnuU8V54mAeuAOifl5djl/WhwY9DElAVd3DzI3O+gJQZcZryV/6dSc79NYxVl/SCBXK/VevWbP 6F4tL0iDPWMcPZ/ro5OJ5RBVNY9w928UTzs7E04GISmzGFi6AlE2qCnUwdiGinWqC1vjrwfB15jXU d/x0LysHcQzwsrxJDKignw==; In-Reply-To: <831qgiuk5g.fsf@gnu.org> (message from Eli Zaretskii on Sat, 05 Aug 2023 08:34:51 +0300) 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:267262 Archived-At: Ping! Stefan, any comments? > Cc: 65058@debbugs.gnu.org > Date: Sat, 05 Aug 2023 08:34:51 +0300 > From: Eli Zaretskii > > > Date: Fri, 4 Aug 2023 21:46:12 +0200 > > From: Jens Schmidt via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > Start from emacs -Q > > > > M-x find-function RET shell-mode RET > > > > Pops you to sh-mode. Or > > > > M-x find-function RET vc-create-repo RET > > > > Pops to vc-git-create-repo. > > > > Which can be confusing. > > > > Maybe completion in `find-function-read' should be done like this: > > > > diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el > > index bf890fc35a9..d393ccc759a 100644 > > --- a/lisp/emacs-lisp/find-func.el > > +++ b/lisp/emacs-lisp/find-func.el > > @@ -591,7 +591,7 @@ find-function-read > > (list (intern (completing-read > > (format-prompt "Find %s" symb prompt-type) > > obarray predicate > > - t nil nil (and symb (symbol-name symb))))))) > > + 'lambda nil nil (and symb (symbol-name symb))))))) > > > > (defun find-function-do-it (symbol type switch-fn) > > "Find Emacs Lisp SYMBOL in a buffer and display it. > > > > Ripped the symbol `lambda' from the completion of `load-file', not sure > > whether there is any better symbol. > > > > Present in Emacs 29 as well. > > Stefan, any comments (to the problem and the proposed solution)? > > > >