Subject: bug#74019: [PATCH] Optionally preserve selected candidate across *Completions* update

From: Juri Linkov <[email-masked]>
Date: Sun, 27 Oct 2024 09:55:04 +0200

>> Add completion-preserve-selection, a defcustom which allows keeping the
>> same selected candidate after *Completions* is updated by
>> minibuffer-completion-help.
>
> Shouldn't we stop complicating the completion machinery at some point?
> It is already basically impenetrable, and if someone still can reason
> about what it does in any specific case, my hat's off to them; I have
> long ago reached the point where the _only_ way of understanding
> what's going on is to step with a debugger through the code -- and it
> doesn't help that some of the code is in Lisp and some in C, so Lisp
> calls into C, which calls back into Lisp, etc., thus one needs to
> interrupt the stepping, fire up a different debugger, then go back.

The last sorely missing feature related to the completions window
is auto-updating the list of completions as you type.  There are several
proposed implementations, and we have to merge them sooner or later.
IIUC, this patch makes preparations to achieve this goal sooner.