unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 73473@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	Jordan Ellis Coppard <jc+o.emacs@wz.ht>
Subject: bug#73473: 31.0.50; Minibuffer completions include nonsense prefix candidates
Date: Thu, 26 Sep 2024 08:21:20 +0200	[thread overview]
Message-ID: <m1y13f540v.fsf@dazzs-mbp.home> (raw)
In-Reply-To: <86r097btqc.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2024 19:09:31 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> merge 73473 72787
> thanks
>
>> Date: Wed, 25 Sep 2024 19:54:59 +0900
>> From:  Jordan Ellis Coppard via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
[...]
>> 1. Open Emacs.
>> 2. C-h o foo TAB
>> 
>> Observe that completion candidate `footnote-` is listed and that there 
>> are 80 completion candidates.
[...]
> Thanks, this is a known bug#72787.  I hope someone will be able to
> look into it soon.

FWIW, I've been using a change along the following lines:
(I don't completely understand why the existing code does what it does,
so I'm not sure that this fix is the right thing to do, but it makes
sense to me and it seems to solve this issue.)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e1daa8977f0..d2539e6074c 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -209,13 +209,9 @@ help--symbol-completion-table
     (when help-enable-completion-autoload
       (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
         (help--load-prefixes prefixes)))
-    (let ((prefix-completions
-           (and help-enable-completion-autoload
-                (mapcar #'intern (all-completions string definition-prefixes)))))
-      (complete-with-action action obarray string
-                            (if pred (lambda (sym)
-                                       (or (funcall pred sym)
-                                           (memq sym prefix-completions))))))))
+    (when help-enable-completion-autoload
+      (mapc #'intern (all-completions string definition-prefixes)))
+    (complete-with-action action obarray string pred)))
 
 (defvar describe-function-orig-buffer nil
   "Buffer that was current when `describe-function' was invoked.





  reply	other threads:[~2024-09-26  6:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 10:54 bug#73473: 31.0.50; Minibuffer completions include nonsense prefix candidates Jordan Ellis Coppard via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-25 16:09 ` Eli Zaretskii
2024-09-26  6:21   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-09-27 15:12   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-27 15:35     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1y13f540v.fsf@dazzs-mbp.home \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73473@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jc+o.emacs@wz.ht \
    --cc=me@eshelyaron.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).