From unknown Fri Jun 20 07:22:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer 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-GNU-PR-Keywords: To: 65058@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169117840426398 (code B ref -1); Fri, 04 Aug 2023 19:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Aug 2023 19:46:44 +0000 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 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 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 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= 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) 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) Message-ID: Date: Fri, 4 Aug 2023 21:46:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: de-DE-frami, en-US From: Jens Schmidt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From unknown Fri Jun 20 07:22:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2023 05:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65058 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jens Schmidt , Stefan Monnier Cc: 65058@debbugs.gnu.org Received: via spool by 65058-submit@debbugs.gnu.org id=B65058.169121368930922 (code B ref 65058); Sat, 05 Aug 2023 05:35:02 +0000 Received: (at 65058) by debbugs.gnu.org; 5 Aug 2023 05:34:49 +0000 Received: from localhost ([127.0.0.1]:55220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS9w8-00082f-Mr for submit@debbugs.gnu.org; Sat, 05 Aug 2023 01:34:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qS9w4-00082Q-K3 for 65058@debbugs.gnu.org; Sat, 05 Aug 2023 01:34:47 -0400 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 1qS9vx-0004d3-R4; Sat, 05 Aug 2023 01:34:37 -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=rZm1t0ymr7ua9KJGaUmJ+ExqnSQj9su5lU5vQ/ZzaRY=; b=RTRawI8BF+jJ ZjmkleVN2PnommnGqNxDAx7oJUM/Z0YpX18CNjofklfq4R+au8aWatAwx+p6+Mp0uwAWw24sb5Sbk eSeRaAOqs+O0iL99nc1G1IUbJkfIhKplzbGlzuQtiBrglYzQ0jPzLKhx00/cXgEm3l38gpFOX8ccr kxNUak8u6vikwDWgcnXnhT8KlhliXa4TavOAiH+IMUpWu5Zcr5kQDKTYpFt91CO74UGrrEYvNG1xd Umf4QtJ7LL4sRr9UZocgJnR0/u3GepFTNYiRIJIy/JGrba/CrbWHc88IgXyODT+9c/yO9HtENsDUa W2fW0MZYZRbZSCqZpsndAA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qS9vx-0000RM-8D; Sat, 05 Aug 2023 01:34:37 -0400 Date: Sat, 05 Aug 2023 08:34:51 +0300 Message-Id: <831qgiuk5g.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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)? From unknown Fri Jun 20 07:22:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer 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 X-GNU-PR-Keywords: To: monnier@iro.umontreal.ca Cc: 65058@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de Received: via spool by 65058-submit@debbugs.gnu.org id=B65058.169182289013717 (code B ref 65058); Sat, 12 Aug 2023 06:49:01 +0000 Received: (at 65058) by debbugs.gnu.org; 12 Aug 2023 06:48:10 +0000 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 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 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==; Date: Sat, 12 Aug 2023 09:48:33 +0300 Message-Id: <837cq0g3i6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <831qgiuk5g.fsf@gnu.org> (message from Eli Zaretskii on Sat, 05 Aug 2023 08:34:51 +0300) References: <831qgiuk5g.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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)? > > > > From unknown Fri Jun 20 07:22:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65058 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 65058@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de Received: via spool by 65058-submit@debbugs.gnu.org id=B65058.169186381016282 (code B ref 65058); Sat, 12 Aug 2023 18:11:02 +0000 Received: (at 65058) by debbugs.gnu.org; 12 Aug 2023 18:10:10 +0000 Received: from localhost ([127.0.0.1]:57294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUt3y-0004EY-Hh for submit@debbugs.gnu.org; Sat, 12 Aug 2023 14:10:10 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUt3w-0004EI-QQ for 65058@debbugs.gnu.org; Sat, 12 Aug 2023 14:10:09 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8719E1000EF; Sat, 12 Aug 2023 14:10:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1691863802; bh=fzon8R8TAcAtbE9s5l+PO48J+kG0OTIT3G4QXmP+l0I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cI0Yjsfi3sDuLSD2X/qiILbrAwvLxhoV+A3x9uMWtzeEfPTKJctanBNn7oLOwJIcw /YBjeFl2YHlC7Jjog47hZ63T0/ra9Cn0mUmxIquLtfX8bsmjF5FrUP6wOUcRA/FVSy kSpxwtFJcUelRRf6a0AzM8wjtPIicg5nS/KN87FjttJJ865M21Qe4WGtWZz05L57iK JzRcAZZ9QorWyUjr1sBU7BFV6Oa7sqcL96VQvyIxhejU01wMl9sQNgyEcWt88065RD AW54yDveS/7txzcUEF8UAp00IffJ95U41Mu8bIP+GAzHMGRFAi7TTxZZVoSC2VJVFy ZL+MnSBsXfdag== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 93B7F1000AD; Sat, 12 Aug 2023 14:10:02 -0400 (EDT) Received: from pastel (69-165-141-248.dsl.teksavvy.com [69.165.141.248]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6E880120223; Sat, 12 Aug 2023 14:10:02 -0400 (EDT) From: Stefan Monnier In-Reply-To: <837cq0g3i6.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Aug 2023 09:48:33 +0300") Message-ID: References: <831qgiuk5g.fsf@gnu.org> <837cq0g3i6.fsf@gnu.org> Date: Sat, 12 Aug 2023 14:10:01 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.134 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Ping! Stefan, any comments? The patch looks OK to me. Stefan From unknown Fri Jun 20 07:22:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jens Schmidt Subject: bug#65058: closed (Re: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer) Message-ID: References: <83msyvcuve.fsf@gnu.org> X-Gnu-PR-Message: they-closed 65058 X-Gnu-PR-Package: emacs Reply-To: 65058@debbugs.gnu.org Date: Sun, 13 Aug 2023 06:36:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1691908563-29071-1" This is a multi-part message in MIME format... ------------=_1691908563-29071-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #65058: 30.0.50; `find-function' can find wrong function due to implicit co= mpletion while exiting minibuffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 65058@debbugs.gnu.org. --=20 65058: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D65058 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1691908563-29071-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 65058-done) by debbugs.gnu.org; 13 Aug 2023 06:35:46 +0000 Received: from localhost ([127.0.0.1]:57979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV4hV-0007Y7-NP for submit@debbugs.gnu.org; Sun, 13 Aug 2023 02:35:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV4hS-0007Xt-Rq for 65058-done@debbugs.gnu.org; Sun, 13 Aug 2023 02:35:44 -0400 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 1qV4hM-0001Gh-21; Sun, 13 Aug 2023 02:35:36 -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=DZMFI0cqehq9Cbp9XCokAFYmCR4VTDfbSmz3msXpRV8=; b=iDUN41P2R8mW WB6X2vYa01YzruhiFu2RUcHbd4fHzmrHVn8eIFmcyiL2muFeW4QFDHh2UguL+StFhxtt/26DKNAdj yoJdzhpcYRJbBm0w+y1n/lkzrjDq0PITmgZ72G2XJv+92NNPhH+r6BYchLw8bQsILhS2T16goOpO1 r5UzOsZGVN6oR28tx/oo5hvT/RWSUtJUD35xO8nXFufQosGcCMcKAIFfuZCFkZmAaSBz6mncutV9P ap3ZnwhpO9N0RT9PAb4IDTGfehy5cVKwHGJvqYo8aXdcyIniDRbS8KPAMoXHhrF2VIcIoy3kpVFQi Mcm12M/JMeZUMeAYeFMFow==; Date: Sun, 13 Aug 2023 09:35:33 +0300 Message-Id: <83msyvcuve.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Sat, 12 Aug 2023 14:10:01 -0400) Subject: Re: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer References: <831qgiuk5g.fsf@gnu.org> <837cq0g3i6.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65058-done Cc: 65058-done@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: jschmidt4gnu@vodafonemail.de, 65058@debbugs.gnu.org > Date: Sat, 12 Aug 2023 14:10:01 -0400 > > > Ping! Stefan, any comments? > > The patch looks OK to me. Thanks. Installed on master, and closing the bug. ------------=_1691908563-29071-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Aug 2023 19:46:44 +0000 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 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 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 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= 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) 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) Message-ID: Date: Fri, 4 Aug 2023 21:46:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: de-DE-frami, en-US From: Jens Schmidt To: bug-gnu-emacs@gnu.org Subject: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. ------------=_1691908563-29071-1--