From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations Date: Fri, 28 May 2021 14:17:12 +0100 Message-ID: References: <87zgwlb4xc.fsf@gmail.com> <617d06ca-27bf-2ae8-26eb-1042123499d3@daniel-mendler.de> <87pmxhb1rs.fsf@gmail.com> <23510125-37b9-e87e-3590-5322f44772ce@daniel-mendler.de> <87y2c5nhsr.fsf@mail.linkov.net> <87h7irss50.fsf@mail.linkov.net> <43d1599e-2ba9-2efb-45c3-76c67d29a69d@daniel-mendler.de> <87tumrgqrb.fsf@gmail.com> <87tumq92pe.fsf@mail.linkov.net> <87lf82g10g.fsf@gmail.com> <87y2c24lww.fsf@mail.linkov.net> <871r9t2lsy.fsf@mail.linkov.net> <22880197-6d05-c821-2c58-328ed3cfc02e@daniel-mendler.de> <87eedruui3.fsf@gmail.com> <8dd915fe-fe67-2a45-67ff-8aaa3e9b9aca@daniel-mendler.de> <878s3zuq47.fsf@gmail.com> <09f2a253-84ba-5cfd-552e-0b89109864a5@daniel-mendler.de> <874kenulu2.fsf@gmail.com> <5f032d77-670e-e83e-fa37-f0a57e08e166@daniel-mendler.de> <87v973t5q3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000790bc405c363b28d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25034"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , emacs-devel , Stefan Monnier , Juri Linkov To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 28 15:18:37 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmcNo-0006Ma-Qc for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 15:18:36 +0200 Original-Received: from localhost ([::1]:57342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmcNn-0002EK-Q4 for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 09:18:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmcMk-0001XS-K7 for emacs-devel@gnu.org; Fri, 28 May 2021 09:17:30 -0400 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:38423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmcMi-00019o-JI for emacs-devel@gnu.org; Fri, 28 May 2021 09:17:30 -0400 Original-Received: by mail-pg1-x534.google.com with SMTP id 6so2520349pgk.5 for ; Fri, 28 May 2021 06:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JIb38dSRzIhlKaK7A9Op0f147FIMnxxlXn56pfD8Z+8=; b=cE/BlCFuEinxrPRIQwMPf/gJFioz3AIsSIrPX0rHQ/Ia9AEokS7RL3zpPwgJo+As1G TzurblcacuxNSH/02N0PjzHsSLARjCW35iKf6N1iElfdPtc94nNqW/NfnGPBeOpJWHBm KxAa1/YbBAjpb1ZWqbyDNkAZL9a+mgrTIUZTUwxDQ4N3kQZwWcoTeWgohWkClQSV1aHG 9hVc+/SD7ym1F84GONrfWZKuXB3w58r58i9+/3dYxnCGdETYFtAor2PNS2jh591ZEr8Y CNdnzQuEmqJv+pEwr3TnkQWeiVGDqs2fkVyiYrghw5I8Q2O2ZvHvvvAGdQWiHlTmoqsd Od3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JIb38dSRzIhlKaK7A9Op0f147FIMnxxlXn56pfD8Z+8=; b=kDnEG5digZTSJoLbWp2RWVS24pbvrqKIxl07vu9E520SK4sH+fVWl9dhV62bIcv6oD DJS6ZPf0go3Uem6FSiSh/VrPW76CAfUTFR0VT3lULpsZFFRQSh37n8w8I4uzFqrjI4/s zpyhiUeCas779ekZ8KB8kmNtY6Mmd2aEhGJ2zCHsG9L1OStyIcGEgTLSaK8TSD/Y92MX V7viO7dLobMoFEWXauXIiF6sRs4l7bI1ZpJpeHwD/+MSTkZHTCJw77s796tDIJQol1bI hmA0GN8jqiUhRXQlWzQ+RddESIJBaKWxVmPDy1Xt90p2VvvixMFcf/9oktmrR1MGn7qu QTPQ== X-Gm-Message-State: AOAM531RVOE84yiFx6G8sKDPceuJxFGAxu4mQuhkgSZoi+eODV2zFqrW wjzWR6GRUKsTxJ6f8bpwe5hJuajmmbPtX7sG+4k= X-Google-Smtp-Source: ABdhPJxZMxoN7GyMDKn0d/L1EqgGFZgVomQxrlAF6xS7dqZ4Nhqx0TUVzTYaboJVs6VBI9Suysigup/cVUxpnQfKY2s= X-Received: by 2002:a63:5c01:: with SMTP id q1mr8956686pgb.447.1622207847008; Fri, 28 May 2021 06:17:27 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=joaotavora@gmail.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270000 Archived-At: --000000000000790bc405c363b28d Content-Type: text/plain; charset="UTF-8" On Fri, May 28, 2021, 13:32 Daniel Mendler wrote: > > Unfortunately this is not a satisfactory solution. I would like to > decouple the components. It is better if the frontend does not have to > know everything and all the field names of the backend. > Of course. And this doesn't happen. > If some filtering inside the marginalia is needed, just make the marginalia field be a plist instead of a flat list. Dmitry's completion-info-columns-function is the same idea in a separate API. Also works, but I prefer this one, as columns is constraining design on the backend side. So no, you did not address this. You enforce a strong coupling between > backend and frontend. > Check again. >> The "waste of processing" argument by Dmitry is okay - I am not against > >> a way to limit the number of returned fields. > > > > It's more than just "okay": it's pretty fundamental. I don't think it's > > a question of limiting the number of returned fields, if the frontend is > > unlucky one of those fields may take ages to calculate based on the > > processing needed (many backends operate through networks or processes > > to request information about completions). > > It is still a technical detail. But since we agree on this one, there is > no need to discuss this further. I don't know if you understand that same frontends might misfunction if they request your full list of marginalia data and the backend has included a slow field there. So the free-form marginalia or table plist should be specified to be very quick to calculate. For example in Marginalia we take some care to not compute particularly > expensive annotations. Which is a drawback. A frontend with async capabilities can choose to request the expensive ones, too, for example. But it is still way too costly to compute all > annotations of all candidates at once. Marginalia works best when the > frontend requests only a small number of annotations for the small > subset of candidates being displayed, as is the case in Vertico or your > newly revamped Icomplete-vertical-mode. > Yes but this is besides the point. > Heh, :-) I think it is rather you who have to state the relevance of > > that item to this discussion. There are lots of packages out there. > > More than "what does it do" we want to know how it is positively or > > adversely impacted by the decisions taken here, if at all. > > Of course, but as soon as I point you to a package specifically you can > take a quick look ;) It is just a datapoint in the discussion. > I did take a quick look, but I was confused. I couldn't confidently make any assertion about it based on the knowledge I gathered from looking at its README. --000000000000790bc405c363b28d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, May 28, 2021, 13:32 Daniel Mendler <mail@daniel-mendler.de> wrote:

Unfortunately this is not a satisfactory solution. I would like to
decouple the components. It is better if the frontend does not have to
know everything and all the field names of the backend.

Of course. And this = doesn't happen.

If some filtering inside the marginalia is needed, ju= st make the marginalia field be a plist instead of a flat list. Dmitry'= s=C2=A0completion-info-columns-function is the same idea in a separate API.= Also works, but I prefer this one, as columns is constraining design on th= e backend side.

So no, you did not address this. You enforce a strong coupling between
backend and frontend.

Check again.=C2=A0

>> The "waste of processing" argument by Dmitry is okay - I= am not against
>> a way to limit the number of returned fields.
>
> It's more than just "okay": it's pretty fundamental.= I don't think it's
> a question of limiting the number of returned fields, if the frontend = is
> unlucky one of those fields may take ages to calculate based on the > processing needed (many backends operate through networks or processes=
> to request information about completions).

It is still a technical detail. But since we agree on this one, there is no need to discuss this further.
=
I don't know if you understand that same fr= ontends might misfunction if they request your full list of marginalia data= and the backend has included a slow field there. So the free-form marginal= ia or table plist should be specified to be very quick to calculate.
<= div dir=3D"auto">
For example in Marginalia we take some care to not compute particularly
expensive annotations.

=
Which is a drawback. A frontend with async capabilities c= an choose to request the expensive ones, too, for example.=C2=A0

But it is still way too costly to compute all
annotations of all candidates at once. Marginalia works best when the
frontend requests only a small number of annotations for the small
subset of candidates being displayed, as is the case in Vertico or your
newly revamped Icomplete-vertical-mode.

Yes but this is besides the point.

> Heh, :-) I think it is rather you who have to state the relevance of > that item to this discussion.=C2=A0 There are lots of packages out the= re.
> More than "what does it do" we want to know how it is positi= vely or
> adversely impacted by the decisions taken here, if at all.

Of course, but as soon as I point you to a package specifically you can
take a quick look ;) It is just a datapoint in the discussion.

I did take a = quick look, but I was confused. I couldn't confidently make any asserti= on about it based on the knowledge I gathered from looking at its README.


--000000000000790bc405c363b28d--