bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el


From: Stefan Monnier
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Date: Wed, 26 May 2021 17:28:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> The "passthrough" (elsewhere called "backend") completion-style is
>> definitely something we need to add, yes.  But what it should do is pass
>> all the args from `completion-all/try-completions` to the table and let
>> the table do *all* the work, i.e. let the completion table implement the
>> completion-style methods.  But we shouldn't call `all-completions` or
>> `try-completions` for that.  Instead we should call the completion-table
>> directly, as is done for the `completion-boundaries` method.
> But `all-completions` and `try-completion` already calls the table
> directly if the table is indeed a table.

Yes, they do, but if you call them, then *you* don't: they call the table in
their own way for their own purpose (e.g. for `all-completions` they
call it to get all the completions matching a given prefix and that's
it, whereas the whole point of `passthrough` is to be able to fetch
matches based on other criteria (defined by the completion table)).

> Basically `all-completions/try-completion` themselves are already
> "passthrough" modulo some calling convention.
> Am I missing something?

Passthrough is about passing the completion-style API directly to
the backend.  `all-completions` is part of the backend API, not the
completion-style API.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]