GNU bug report logs -
#74420
31.0.50; PCM completion for ~/src/emacs/trunk/*/minibuf breaks
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Mon, 18 Nov 2024 17:34:01 UTC
Severity: normal
Tags: patch
Found in version 31.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 74420 <at> debbugs.gnu.org (full text, mbox):
> Actually... I just realized this misses some cases, namely when we have
> "star point" or "point star".
FWIW, my local patches have included for years optimizations like the
ones you suggested *and* they replaced `star point` and `point star`
with just `star`.
Do you think it's important to preserve `point` in those cases?
>> BTW, maybe we should go with something like
>>
>> (`(,(and (pred symbolp) s1) ,(and (pred symbolp) s2) . ,rest)
>> (cond ((completion-pcm--<something>-p s1 s2) (setq p (cons s1 rest)))
>> ((completion-pcm--<something>-p s2 s1) (setq p (cons s2 rest)))
>> (t (push (pop p) n))))
>>
>> Where `completion-pcm--<something>-p` is some kind of partial ordering?
>
> Interesting thought. Maybe it would make sense to have something like
> - completion-pcm--wildcard-grows-on-left-p
> (non-nil for star, point, any, any-delim)
> - completion-pcm--wildcard-grows-on-right-p
> (non-nil for star, point, prefix)
> - completion-pcm--wildcard-in-text-p
> (non-nil for star and point)
> Then this case would be something like "if grows-left/right-p is the
> same, and at most one of the symbols is in-text-p, delete the
> non-in-text-p one".
But I guess your `completion-pcm--merge-completions` is still needed as
long as we can't optimize all sequences of symbols to a single symbol.
🙁
Stefan
This bug report was last modified 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.