From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: complexity in minibuffer Date: Wed, 02 Jun 2021 11:38:54 -0400 Message-ID: References: <8dd915fe-fe67-2a45-67ff-8aaa3e9b9aca@daniel-mendler.de> <878s3zuq47.fsf@gmail.com> <09f2a253-84ba-5cfd-552e-0b89109864a5@daniel-mendler.de> <875yyxaoxp.fsf@gmail.com> <871r9laj6a.fsf@gmail.com> <1b73a130-204c-76fb-2b60-02b814aee0f0@daniel-mendler.de> <87r1hl8xom.fsf@gmail.com> <878s3t8tzw.fsf@gmail.com> <3c68bd00-70ca-fa18-f9b8-cd03029f9294@daniel-mendler.de> <8735u18lsd.fsf@gmail.com> <8e33bbfe-0015-b85c-b57c-ba448f2e6215@yandex.ru> <3d519805-f602-fa52-ec69-0506bb6cb568@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24120"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Dmitry Gutov , Daniel Mendler , "emacs-devel@gnu.org" , Juri Linkov To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 02 17:40:02 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 1loSyO-0005zX-MY for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 17:40:00 +0200 Original-Received: from localhost ([::1]:46604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loSyN-0006sj-OU for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 11:39:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loSxR-00069i-Fn for emacs-devel@gnu.org; Wed, 02 Jun 2021 11:39:01 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loSxO-0002wt-9C for emacs-devel@gnu.org; Wed, 02 Jun 2021 11:39:00 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 43E0110028A; Wed, 2 Jun 2021 11:38:57 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BB83E1001FB; Wed, 2 Jun 2021 11:38:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1622648335; bh=A3uFy8ynXRwswZupNlPjrWWS60whGJsiFdj6hv9jDoo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=PRuhfP/nkyH8/EuTz0CA8FHQQjmW84OMBlAnFAy6f7y1gQWlVrNS98hakJIZlJcqj aokCab23A/dBWtuCkcqgMiwpN/iRjd1fkIPMTqPHJP4zvdiszVKean3vmWJFU+yRwF lbnedRl5erdzS/QZpq9JaIMo4b6JPN+YhrnBdRt0CobmEL5YUE1F2Uq8OVMCDTU4oE TLakkXDhjF1LPd9uP3GAeRt26IFyK0bW84Yc739WJXpyZR/LSjIEbNkITusLeTSg6T s7TBiBWPE/EPlaAt1lZxfYNsj8O1FD1QYYDLZAGzqSEk6VHBDSZwk7+lUfL3PHLngb lvxQTFOxMF3nQ== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6C187120210; Wed, 2 Jun 2021 11:38:55 -0400 (EDT) In-Reply-To: (=?windows-1252?Q?=22Jo=E3o_T=E1vora=22's?= message of "Wed, 2 Jun 2021 16:20:30 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:270306 Archived-At: > By that time, you have already traversed the completion list many times. > What's the problem with having the completions themselves contain > all that's needed to render them? If you have 10K completions, the time need to compute their rendering becomes very significant, so we want to only compute the rendering for those completion which actually reach the glass. > Let's have it so that at a certain point, a collection of completions > (whatever the format of collection and/or completion) is enough to draw > them, no more dependency on global state or multiple funky arguments > that are hard to mock. Less if's. Great for automated testing, too. That can be done once you know which completions can be displayed, yes. Basically, we need a function that takes a (potentially large) set of "raw candidates" and turns it into the (hopefully smallish) set of rendered candidates which we'll actually display. >> I don't have a strong opinion here, except that I think it would make >> sense to handle `group-function` and `annotation/affixation-function` at >> the same place. > You do have to call the first on all of the completions and the latter only > on a subset to be displayed. That's a constraint of the problem itself. Not necessarily: you could also decide to only group those completions which are displayed. Stefan