GNU bug report logs - #65058
30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Fri, 4 Aug 2023 19:47:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#65058: closed (30.0.50; `find-function' can find wrong
 function due to implicit completion while exiting minibuffer)
Date: Sun, 13 Aug 2023 06:36:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 13 Aug 2023 09:35:33 +0300
with message-id <83msyvcuve.fsf <at> gnu.org>
and subject line Re: bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
has caused the debbugs.gnu.org bug report #65058,
regarding 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
65058: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65058
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 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
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.


[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 65058-done <at> debbugs.gnu.org, jschmidt4gnu <at> vodafonemail.de
Subject: Re: bug#65058: 30.0.50; `find-function' can find wrong function due
 to implicit completion while exiting minibuffer
Date: Sun, 13 Aug 2023 09:35:33 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: jschmidt4gnu <at> vodafonemail.de,  65058 <at> 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.


This bug report was last modified 1 year and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.