GNU bug report logs - #73473
31.0.50; Minibuffer completions include nonsense prefix candidates

Previous Next

Package: emacs;

Reported by: Jordan Ellis Coppard <jc+o.emacs <at> wz.ht>

Date: Wed, 25 Sep 2024 14:26:02 UTC

Severity: normal

Merged with 72787, 73092

Found in version 31.0.50

Full log


Message #13 received at 73473 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73473 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Jordan Ellis Coppard <jc+o.emacs <at> wz.ht>
Subject: Re: bug#73473: 31.0.50; Minibuffer completions include nonsense
 prefix candidates
Date: Thu, 26 Sep 2024 08:21:20 +0200
Eli Zaretskii <eliz <at> 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 <at> 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.




This bug report was last modified 263 days ago.

Previous Next


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