bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64351: probabe bug associated with “completion-regexp-list”


From: Eli Zaretskii
Subject: bug#64351: probabe bug associated with “completion-regexp-list”
Date: Sat, 01 Jul 2023 11:21:07 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Shynur Xie <one.last.kiss@outlook.com>,  64351@debbugs.gnu.org
> Date: Fri, 30 Jun 2023 14:33:49 -0400
> 
> > Stefan, is the below the right fix?  If it is, do you think it is safe
> > enough for the release branch?
> >
> > diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
> > index 4aa1ab3..3e30b68 100644
> > --- a/lisp/minibuffer.el
> > +++ b/lisp/minibuffer.el
> > @@ -4027,7 +4027,8 @@ completion-pcm--merge-completions
> >                (setq ccs (nreverse ccs))
> >                (let* ((prefix (try-completion fixed comps))
> >                       (unique (or (and (eq prefix t) (setq prefix fixed))
> > -                                 (eq t (try-completion prefix comps)))))
> > +                                 (and (stringp prefix)
> > +                                      (eq t (try-completion prefix 
> > comps))))))
> >                  (unless (or (eq elem 'prefix)
> >                              (equal prefix ""))
> >                    (push prefix res))
> 
> I'd argue that the better fix is to let-bind `completion-regexp-list` to
> nil around the `minibuffer.el` code which uses
> `try/all/test-completion` to protect against those kinds of misuses.

You are saying that you don't like my proposed patch for the emacs-29
branch, and would even prefer to leave it unfixed?

The binding you propose might be appropriate for master, but not for
the release branch.

> Or alternatively to say "if it hurts, don't do that".

That could be okay, if we also say how to use this variable so it
doesn't hurt.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]