From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations Date: Fri, 28 May 2021 18:01:15 +0200 Message-ID: References: <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> <6937cf53-98fc-98ff-3026-b5eccf461a76@daniel-mendler.de> <74e97523-2f86-f365-d183-fddc015fc0dc@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15809"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov , monnier@iro.umontreal.ca, "emacs-devel@gnu.org" To: Dmitry Gutov , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 28 18:05:31 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 1lmezK-0003q9-Au for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 18:05:30 +0200 Original-Received: from localhost ([::1]:48710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmezJ-0006af-8j for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 12:05:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmevR-0001Um-DK for emacs-devel@gnu.org; Fri, 28 May 2021 12:01:32 -0400 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180]:41583 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmevK-0006vn-3W for emacs-devel@gnu.org; Fri, 28 May 2021 12:01:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pRDrM/mQ9w1juDy6//uJ6kALn3s+IpDqOfSSGlu+yL0=; b=xuGqQ7jXm8dSyfULMgsOlN4CjY W3lWrtDIqE0xzAao14/B6WuL0zni5+VtpyU9tSI88c8XTwSnUwg1bk+2CZBo4A7cQRpHQuqyUp9yu rOcI2q94UP3dvC9y7dIT+A/elGVQdID5HSlxZ9uBg+KMf41M3KPOKn+W0G75qus6cam0=; In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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:270009 Archived-At: On 5/28/21 4:57 PM, Dmitry Gutov wrote: > On 28.05.2021 17:10, Daniel Mendler wrote: > >> What about the possibility for the backend to return some kind >> of description of the available data? >> >> (:kind 'icon :keybinding 'string :description 'string ...) >> >> But maybe that's also overkill. > > I could get behind something like this. Though it does look like extra > work for backend writers. There is certainly some extra work. On the other hand the backend has to do a lot of unnecessary formatting which could be pushed to the frontend layer. The formatting happens for example in Marginalia, which hooks into the backend completion table. > My thinking was more along the lines of having the attribute types > simply be described in the docs (then only the "known" attributes would > be rendered by different frontends), but you and the Marginalia > community can probably make a better choice between these options than > myself (*). > > Note that this is still compatible with my suggestions of > completion-info-columns-function, the latter could still be used for > some presentation-level choices (like which columns to display and in > which order; but also be able to show arbitrary columns). But it becomes > less necessary for sure. > > (*) From where I'm standing, there should be a limited set of columns > you'll want to show in such table. Then we could basically document them > all at once and forego the introspection capability. But I definitely > can be wrong about this. Yes, this is the difference between the UIs. For vertical completing-read UIs (default completion with one-column, Vertico, etc) there is plenty of space to show a lot of helpful information. For popups this is not the case, there you only want a small set of columns, which could be hard-coded. >From my perspective it would be a significant improvement if backends could add arbitrary fields (with some associated field type, the frontend can understand or ignore), in contrast to only allowing a fixed set of fields. >From what I've seen the Icomplete patch by João is quite independent of this discussion here and could go in as is. We should probably compare different prototypes for an enhanced affixation/decoration function to see how the result could actually look and how well it works in the different scenarios. Daniel