From: "João Távora" <joaotavora@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Augusto Stoffel <arstoffel@gmail.com>,
Lars Ingebrigtsen <larsi@gnus.org>,
Michael Albinus <michael.albinus@gmx.de>,
50459@debbugs.gnu.org, Gregory Heytings <gregory@heytings.org>
Subject: bug#50459: 28.0.50; Python shell completion is incompatible with flex, orderless, etc.
Date: Fri, 10 Sep 2021 15:39:46 +0100 [thread overview]
Message-ID: <CALDnm53q3fPD-ouEgVVEosp2zH93dj9K+_-Ycj0Q8wOmLAzrSw@mail.gmail.com> (raw)
In-Reply-To: <cea82eb7-1655-4e8b-8fed-329f8f753d36@yandex.ru>
On Fri, Sep 10, 2021 at 3:22 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> On 10.09.2021 17:06, João Távora wrote:
> > On Fri, Sep 10, 2021 at 2:28 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
> >>
> >> On 10.09.2021 16:14, João Távora wrote:
> >>> - If you're OK with letting the server do the filtering and the
> >>> highlighting, you can make a "backend" style like I did for SLY, for
> >>> example. It's going to be faster, but `completion-styles` won't be
> >>> honoured. That's doesn't mean you give up 100% on "flex". In SLY,
> >>> there is flex implemented on the Common Lisp side, and for Eglot, many
> >>> LSP server do their own flex matching.
> >>
> >> You can't really do that with python-shell completion.
> >
> > Probably not unless you write some python, no. I don't see that
> > as being that dirty.
>
> I didn't say it was dirty, just not very fitting for the current
> approach: when you do completion by piping code for evaluation through
> inferior shell, you generally like that code to be simple. And
> reimplementing every completion style in Python seems like anything but.
I was just volunteering an opinion on how to solve _most_ of the problem
(hence I wrote "don't give up 100%") Never did I suggest to implement
"every completion style". SLY implements only two in Common Lisp.
They're pretty sufficient for most users it seems. Most language servers
seem to implement flex, some only prefix, some may be configurable
I suppose.
> Completion backends do caching anyways, whether it's on the Emacs side,
> or somewhere inside a language server.
There are many types of caching, as I tried to explain.
Inter-capf-invocation caching (if you can understand what I mean)
is possible, but is probably harder to get right than the "intra" version.
I'm really just stating the obvious: the more removed you are from
the source of truth, the harder it becomes to cache. But also, it's
true that are definitely valuable, if implemented correctly or if a
degree of inaccuracy is tolerated. Fast and accurate is hard.
João Távora
next prev parent reply other threads:[~2021-09-10 14:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 17:52 bug#50459: 28.0.50; Python shell completion is incompatible with flex, orderless, etc Augusto Stoffel
2021-09-08 17:44 ` Augusto Stoffel
2021-09-09 7:11 ` Michael Albinus
2021-09-09 7:32 ` Gregory Heytings
2021-09-09 7:30 ` Gregory Heytings
2021-09-09 7:40 ` Augusto Stoffel
2021-09-09 7:49 ` Gregory Heytings
2021-09-09 8:45 ` Augusto Stoffel
2021-09-09 8:50 ` Gregory Heytings
2021-09-09 16:46 ` Augusto Stoffel
2021-09-10 11:37 ` Lars Ingebrigtsen
2021-09-10 11:50 ` Augusto Stoffel
2021-09-10 13:14 ` João Távora
2021-09-10 13:28 ` Dmitry Gutov
2021-09-10 14:06 ` João Távora
2021-09-10 14:22 ` Dmitry Gutov
2021-09-10 14:39 ` João Távora [this message]
2021-09-10 14:43 ` Dmitry Gutov
2021-09-10 19:27 ` Augusto Stoffel
2021-09-10 20:08 ` João Távora
2021-09-11 12:09 ` Lars Ingebrigtsen
2021-09-11 12:34 ` Augusto Stoffel
2021-09-11 12:36 ` Lars Ingebrigtsen
2021-09-10 13:32 ` Dmitry Gutov
2021-09-10 19:08 ` bug#50459: 28.0.50; [PATCH] " Augusto Stoffel
2021-09-11 12:50 ` Lars Ingebrigtsen
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=CALDnm53q3fPD-ouEgVVEosp2zH93dj9K+_-Ycj0Q8wOmLAzrSw@mail.gmail.com \
--to=joaotavora@gmail.com \
--cc=50459@debbugs.gnu.org \
--cc=arstoffel@gmail.com \
--cc=dgutov@yandex.ru \
--cc=gregory@heytings.org \
--cc=larsi@gnus.org \
--cc=michael.albinus@gmx.de \
/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.