GNU bug report logs - #79265
[PATCH] Treat point more consistently in PCM completion

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Mon, 18 Aug 2025 18:54:01 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 79265 <at> debbugs.gnu.org
Subject: Re: bug#79265: [PATCH] Treat point more consistently in PCM
 completion, [PATCH] Treat point more consistently in PCM completion
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





This bug report was last modified 9 days ago.

Previous Next


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