Subject: Re: bug#79265: [PATCH] Treat point more consistently in PCM completion, [PATCH] Treat point more consistently in PCM completion

From: Stefan Monnier <[email-masked]>
Date: Sat, 23 Aug 2025 02:58:55 -0400

> So how about this?  This mostly reverts my earlier patch, so it may be
> easier to review it relative to the old version before my earlier patch.

Now I'm wondering what is the advantage of this new code compared to the
old code.

> * lisp/minibuffer.el (completion-pcm--pattern->regex): When
> GROUP is group-all, also group strings in PATTERN.

Why do we need that?

> diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el
> index c2c37e63012..e5868351619 100644
> --- a/test/lisp/minibuffer-tests.el
> +++ b/test/lisp/minibuffer-tests.el
> @@ -332,6 +332,14 @@ completion-pcm-test-8
>                    "" '("fooxbar" "fooybar") nil 0)
>                   '("foobar" . 3))))
>  
> +(ert-deftest completion-pcm-bug4219 ()
> +  ;; With `completion-ignore-case', try-completion should change the
> +  ;; case of existing text when the completions have different casing.
> +  (should (equal
> +           (let ((completion-ignore-case t))
> +             (completion-pcm-try-completion "a" '("ABC" "ABD") nil 1))
> +           '("AB" . 2))))
> +
>  (ert-deftest completion-substring-test-1 ()
>    ;; One third of a match!
>    (should (equal

Thanks,

        Stefan