On Tue, Nov 22, 2022 at 9:34 PM João Távora <joaotavora@gmail.com> wrote:
It does makes sense to start simple, but ignoring scale rarely yields
the "desired behaviour" unless that behavior is waiting forever.

Speaking of "ignoring scale", I've been meaning to propose here that
the "Backend completion style" you once wrote, Stefan, be added
to Emacs and to GNU Elpa as a separate :core package.

This style is very useful: I've used it successfully in three separate
occasions:  Eglot, SLY and the voidtools everything file indexer
completion table (https://github.com/joaotavora/eel/blob/master/eel.el)

It's true that it stings a bit to bring in a completion style whose purpose
is to negate the use of all other fancy styles and let the external
backend do some unknown idiosyncratic pattern matching for us.
But it ends up working so well in practice...

As data sets grow larger, I think we have to come to terms that
Emacs is just not very performant in managing very large collections
of strings, and other special-purpose external tools implemented in other
languages are just faster, not to mention the cases where you _have_
to interact with those tools for other reasons anyway and you just can't
afford to transfer the whole dataset to Emacs as a big list of strings.

IOW, I think Emacs's styles are pretty good for its own Elisp Lisp
machine (until about a couple of hundred thousand symbols) and
for managing small collections, but for anything larger we need
other techniques.

So the idea is to create a `lisp/progmodes/backend-completion.lisp` with
the  generalized contents of what is now the ";;; Backend completion"
section of eglot.el.  WDYT, Stefan et al?

João