all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
@ 2023-08-04 19:46 Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-05  5:34 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-04 19:46 UTC (permalink / raw)
  To: 65058

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.





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
  2023-08-04 19:46 bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-05  5:34 ` Eli Zaretskii
  2023-08-12  6:48   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-05  5:34 UTC (permalink / raw)
  To: Jens Schmidt, Stefan Monnier; +Cc: 65058

> 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" <bug-gnu-emacs@gnu.org>
> 
> 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)?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
  2023-08-05  5:34 ` Eli Zaretskii
@ 2023-08-12  6:48   ` Eli Zaretskii
  2023-08-12 18:10     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-12  6:48 UTC (permalink / raw)
  To: monnier; +Cc: 65058, jschmidt4gnu

Ping!  Stefan, any comments?

> Cc: 65058@debbugs.gnu.org
> Date: Sat, 05 Aug 2023 08:34:51 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > 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" <bug-gnu-emacs@gnu.org>
> > 
> > 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)?
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
  2023-08-12  6:48   ` Eli Zaretskii
@ 2023-08-12 18:10     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-13  6:35       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-12 18:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65058, jschmidt4gnu

> Ping!  Stefan, any comments?

The patch looks OK to me.


        Stefan






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer
  2023-08-12 18:10     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-13  6:35       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-13  6:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 65058-done, jschmidt4gnu

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> 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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-13  6:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-04 19:46 bug#65058: 30.0.50; `find-function' can find wrong function due to implicit completion while exiting minibuffer Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05  5:34 ` Eli Zaretskii
2023-08-12  6:48   ` Eli Zaretskii
2023-08-12 18:10     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-13  6:35       ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.