From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Date: Fri, 4 Aug 2023 21:46:12 +0200 Message-ID: Reply-To: Jens Schmidt Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29663"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: 65058@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 04 21:47:15 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 1qS0lX-0007UP-5g for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Aug 2023 21:47:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qS0lL-0007EL-Iv; Fri, 04 Aug 2023 15:47: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 1qS0lK-0007E4-Cb for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 15:47: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 1qS0lK-0007wF-4l for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 15:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qS0lK-0006sG-0F for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 15:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2023 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65058 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169117840426398 (code B ref -1); Fri, 04 Aug 2023 19:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Aug 2023 19:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:54940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS0l2-0006rg-Ev for submit@debbugs.gnu.org; Fri, 04 Aug 2023 15:46:44 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:59392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS0kz-0006rR-CB for submit@debbugs.gnu.org; Fri, 04 Aug 2023 15:46:42 -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 1qS0kt-00075u-TC for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 15:46:36 -0400 Original-Received: from mr6.vodafonemail.de ([145.253.228.166]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qS0kr-0007o8-31 for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 15:46:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1691178380; bh=TQvL4FXR8MSVPqhea1+brvmVwoCQjee1/pYd75wUi0g=; h=Message-ID:Date:User-Agent:Content-Language:From:To:Subject: Content-Type:From; b=EkAxZZfxYJkPfMTsHOCDySNi/e90GY9wUuYGzHDdjhjGCO1nlxA6r4wNvQt2LIsf6 QMryRf0DDjCC9DKRQ8WRdiRFxsZd0xeZ205rpgDeTSnUMHpf43CuANBCwpBHQs7kh9 ZasstQ6DEbJfdzFko5kzZqGAxsgZg4Um32bHx8zk= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4RHbn839QGz1xxX for ; Fri, 4 Aug 2023 19:46:20 +0000 (UTC) Original-Received: from [192.168.178.41] (port-92-194-152-239.dynamic.as20676.net [92.194.152.239]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RHbn41MYWzHpxb for ; Fri, 4 Aug 2023 19:46:13 +0000 (UTC) Content-Language: de-DE-frami, en-US X-purgate-type: clean X-purgate: clean X-purgate-size: 1026 X-purgate-ID: 155817::1691178376-D97FC3B9-E9FAEC81/0/0 Received-SPF: pass client-ip=145.253.228.166; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr6.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:266714 Archived-At: 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.