all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: mail@daniel-mendler.de, 48572@debbugs.gnu.org
Subject: bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el
Date: Sun, 23 May 2021 18:33:42 +0100	[thread overview]
Message-ID: <CALDnm51FMkaJpQ6etog3wK5ABtCPEh39UrOCx1i7nxJtk87-GA@mail.gmail.com> (raw)
In-Reply-To: <jwvr1hx1mj2.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]

If it helps, I've a working copy of Stefan's idea over at
github.com/joaotavora/sly.

Indeed it's called backend there, and it's been working fine for some years
to let Sly's completion providing backend do the flex or prefix heavy
lifting, while still appearing as a normal completion table to Emacs
frontends, such as icomplete, vanilla, company-capf and even Helm.

A first approach could be just to copy that over to Emacs minubuffer.el.

João

On Sun, May 23, 2021, 16:51 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> >> Clearly, this is not right: passthrough completion should pass the `str`
> >> and `point` info to the completion table.  The completion table may opt
> >> to ignore that information, but we shouldn't prevent them from using it.
> >> I expect most passthrough uses will want to use `str`.
> >
> > I see what you mean. In my use case I didn't use an improperly
> > implemented completion table which does not ignore . However the
> > question is then if this "passthrough" style is really needed since if
> > you don't ignore the input, it is mostly equivalent to the emacs21 style.
>
> 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.
>
>
>         Stefan
>
>

[-- Attachment #2: Type: text/html, Size: 2273 bytes --]

  reply	other threads:[~2021-05-23 17:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 18:48 bug#48572: 28.0.50; Add `passthrough` completion style to minibuffer.el Daniel Mendler
2021-05-22 23:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-23 10:21   ` Daniel Mendler
2021-05-23 10:36     ` Daniel Mendler
2021-05-23 15:50     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-23 17:33       ` João Távora [this message]
2021-05-23 19:58       ` Daniel Mendler
2021-05-26 21:28         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-30  3:23           ` Daniel Mendler
2021-05-30 13:03             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-23  1:07 ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDnm51FMkaJpQ6etog3wK5ABtCPEh39UrOCx1i7nxJtk87-GA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=48572@debbugs.gnu.org \
    --cc=mail@daniel-mendler.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.