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


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Spencer Baugh <sbaugh <at> janestreet.com>, 79265 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#79265: [PATCH] Treat point more consistently in PCM completion
Date: Tue, 19 Aug 2025 07:04:02 +0300
On 18/08/2025 21:53, Spencer Baugh wrote:
> Properly fix bug#38458, which is fundamentally an issue with
> completion-ignore-case, by checking if the completions are
> unique ignoring case.  When the completions are unique, the
> normal code to delete a wildcard naturally causes point to be
> moved to the end of the minibuffer, which is the correct
> behavior.
> 
> Now that the bug is fixed properly, remove a hack which
> previously was used to "fix" it, which made point behave
> inconsistently if it was in the middle of the minibuffer versus
> at the end of the minibuffer.

Thanks, the description makes sense and the tests are great to have.

I wonder if Stefan will want to comment though.

Just one thing:

> +                                      ;; They're all the same string, ignoring case.
> +                                      (seq-every-p
> +                                       (lambda (elem) (string-equal-ignore-case elem prefix))
> +                                       comps)))))

Is this performance-sensitive? Using a less abstracted function like 
cl-every of even a (cl-loop for ... always ...) could be faster.

There is a (dolist) above it which iterates across segments of the 
pattern, so whatever overhead is added could be multiplied; OT2H I 
haven't tested it myself yet, maybe all bottlenecks are somewhere else.




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.