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

From: Stefan Monnier <[email-masked]>
Date: Sat, 26 Oct 2024 10:59:18 -0400

> Shouldn't we stop complicating the completion machinery at some point?

Complexity knows no bounds.

OT1H I agree that the completion infrastructure would benefit from some
cleanup and is too complex in some areas.  OTOH this specific request
doesn't affect the "completion machinery", but only the
`minibuffer-completion-help` functionality which is a fairly simple part
of the code.

> 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.

I luckily haven't had to step through the C code of the completion in
a long while.  But the code layout could be improved to better reflect
the architecture of the system (the separation between the "backend"
(completion tables), the "middle end" (completion styles), the standard
minibuffer UI, the in-buffer UI, the completion-list-mode).

> Stefan, WDYT?  Should we close completion to further development and
> accept only bugfixes?

🙂

        Stefan