From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations Date: Fri, 28 May 2021 21:46:40 +0300 Organization: LINKOV.NET Message-ID: <87v972hf1r.fsf@mail.linkov.net> References: <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: 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="33549"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: "emacs-devel@gnu.org" , =?iso-8859-1?Q?Jo=E3o_T=E1vora?= , monnier@iro.umontreal.ca, Dmitry Gutov To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 28 20:52:16 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 1lmhah-0008YX-Uc for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 20:52:15 +0200 Original-Received: from localhost ([::1]:49214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmhah-0003QS-10 for ged-emacs-devel@m.gmane-mx.org; Fri, 28 May 2021 14:52:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmhYw-0000Sm-UP for emacs-devel@gnu.org; Fri, 28 May 2021 14:50:26 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:51193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmhYn-0004ox-Ak for emacs-devel@gnu.org; Fri, 28 May 2021 14:50:26 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 68957240003; Fri, 28 May 2021 18:50:10 +0000 (UTC) In-Reply-To: (Daniel Mendler's message of "Fri, 28 May 2021 14:32:32 +0200") Received-SPF: pass client-ip=217.70.183.193; envelope-from=juri@linkov.net; helo=relay1-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:270017 Archived-At: > For example in the case of `describe-symbol`, there would be these columns: > > * keybinding (only supplied for commands) > * type (customizable-variable, command, function, variable, face, ...) > * description (first line of docstring) > * maybe more? > > So it would be a positive impact if candidates could be annotated with > arbitrary fields, which the frontend does not know beforehand. The only > thing the frontend must support is the type of the fields. There could > be frontends supporting strings, numbers, images, audio, ... > > From how I understood Juri in a mail a while ago, he was talking about > exactly such a tablist frontend. So I would like to hear his opinion on > this question. 1. A simple call with a string candidate could return its supported fields: (funcall resolution/decoration-function "candidate") ⇒ (:prefix "prefix" :suffix "suffix" :my-annotation1 "suffix1" :my-annotation2 "suffix2" ...) 2. A call with nil instead of the string candidate could return the metadata of all supported fields, e.g.: (funcall resolution/decoration-function nil) ⇒ ((:name :prefix :type 'string) (:name :suffix :type 'string) (:name :my-annotation1 :type 'number :tags '(:expensive-field :unstable)) (:name :my-annotation2 :type 'image) (:name :tablist :type 'list)) 3. A call with an additional field could restrict the output only to that field: (funcall resolution/decoration-function "candidate" :prefix) ⇒ "prefix"