On Sat, Dec 3, 2022 at 2:26 PM Stefan Monnier <
monnier@iro.umontreal.ca> wrote:
> > Integrate Stefan suggestions but rename it to "external-completion.el"
> Ha! Great minds thing alike!
Nice!
> > +(add-to-list 'completion-styles-alist
> > + '(external-completion-style
>
> This sounds a bit like the RAS syndrome, just without the acronym.
> Why not use just `external`?
Good idea. Done.
> > +(defun external-completion-table (lookup
> > + category &optional metadata
> > + try-completion-function)
>
> Ah, I see you made tryc optional :-)
> I'd put `category` on the first line, tho.
> If you don't like the resulting indentation of the second line, then
> just add a space before "lookup" :-).
Haha. Yes I fixed it. And category is now the first argument, I think it's
slightly more logical.
> > +TRY-COMPLETION-FUNCTION is an poorly understood implementation detail.
>
> Not at all. It's a functionality that only makes sense for some UIs
> (not those based on the idea of selecting among a set of choices), and
> it tends to work better with more "primitive" completion styles (it
> asymptotically becomes useless the harder the completion style tries to
> find completions).
I'm still confused, I need examples to understand this stuff, and I'm afraid
If I do I'll forget all about it next time around. But personally I don't _have_ to
understand it, really. Been using this for years successfully without
understanding it, so why should I start now? I made the docstring
even more cheeky so you can see what I mean.
> AFAICT the `external-completion-tryc/allc` symbols are not exposed to
> users of this library any more so we could use ones with a double hyphen.
Good idea. Done.