From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47711: bug#48841: bug#47711: bug#48841: bug#47711: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting Date: Thu, 02 Nov 2023 12:58:27 +0200 Message-ID: <834ji48lrg.fsf@gnu.org> References: <56ab18b1-4348-9b2c-85bb-af9b76cd429a@daniel-mendler.de> <328f87eb-6474-1442-e1ca-9ae8deb2a84a@yandex.ru> <83fsvcbio7.fsf@gnu.org> <9f432d18-e70f-54c1-0173-1899fb66d176@gutov.dev> <877cnafv39.fsf@gmail.com> <9447dde3-b8e7-2ec0-9a9c-72c4cf9d12a8@gutov.dev> <7d14bc13-4419-816c-5708-c42988c39c02@gutov.dev> <5d0a78cc-4fa0-ef04-3462-1826f17d7d56@gutov.dev> <877cn8asud.fsf@gmail.com> <8734xtauqj.fsf@gmail.com> <5181f95e-61e7-c8c4-6389-44ee57e0c749@gutov.dev> <31cadbfd-d086-a04f-0ed9-17ce70b4282c@gutov.dev> <835y2k8nyt.fsf@gnu.org> 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="30520"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 47711@debbugs.gnu.org, monnier@iro.umontreal.ca, mail@daniel-mendler.de To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 02 11:59:49 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qyVQS-0007jp-Vj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Nov 2023 11:59:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyVQA-00071D-Ce; Thu, 02 Nov 2023 06:59:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyVQ8-00070J-AQ for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 06:59:28 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyVQ7-0000Hg-C9 for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 06:59:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyVQg-00051d-7U for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 07:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Nov 2023 11:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47711 X-GNU-PR-Package: emacs Original-Received: via spool by 47711-submit@debbugs.gnu.org id=B47711.169892276019243 (code B ref 47711); Thu, 02 Nov 2023 11:00:02 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 2 Nov 2023 10:59:20 +0000 Original-Received: from localhost ([127.0.0.1]:54019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyVQ0-00050J-A1 for submit@debbugs.gnu.org; Thu, 02 Nov 2023 06:59:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyVPw-000505-UX for 47711@debbugs.gnu.org; Thu, 02 Nov 2023 06:59:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyVPG-00087z-Rp; Thu, 02 Nov 2023 06:58:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=I33Lh/R2aQtq/3xrBnKGKKziPi42D4uQEohoZDPsPgA=; b=YXLiFlmHzcXNwmIOHcf8 DvedO5AF2XQDT9jtikgXzgLWK7hX/98EA60hGD2vQQ5Qw6J/7Yqs2/UKho30vPI8XkZkgTg4UOBg2 d3HrT0zsTwqaIPXFuJ6UeDmy5rF/D4GBsYEXVzwmUbM/bPakUNRxLyswT14xlVceY8P4UuguZPO1R sW83UcyhnqvmNcyu0fUhdDyHvi/z9WOKV8lWloRjFS+02h3ayCP4W+Og5kJf6O2MfvAbGlHzTMF/1 6e8kyqL7P0UEEPe42D8xnm+84sDPSX+pC2saXJqhsEvn4oWKHEt2Vdv+q6uo+i5YwIVXTX3Cdrtf/ vXa7ygA+NjoJdg==; In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Thu, 2 Nov 2023 10:39:53 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273646 Archived-At: > From: João Távora > Date: Thu, 2 Nov 2023 10:39:53 +0000 > Cc: dmitry@gutov.dev, mail@daniel-mendler.de, monnier@iro.umontreal.ca, > 47711@debbugs.gnu.org > > > > Stefan, Eli, would you like to chime in? > > > > Chime in on what aspect(s) of this discussion (or the patch)? > > The patch condenses the results of the discussion of last week, > as resuscitated by Dmitry after a 2-year long hiatus. > > After some rounds of benchmarking and discussion, Dmitry and I > think the latest version of the patch should be installed. Are there any problematic aspects of the patch that need to be discussed or considered before installing the patch? IOW, why are you soliciting our opinions, instead of just going ahead and installing? > In a nutshell it solves the performance problem of overly eager > completion highlighting with minimal changes to the completion API. It looks to me like it adds a new feature, not just solves a performance problem? Some minor comments to the patch itself: > +(defvar-local completion-lazy-hilit nil > + "If non-nil, request completion lazy highlighting. > + > +Completion-presenting frontends may opt to bind this variable to > +non-nil value in the context of completion-producing calls (such > +as `completion-all-completions'). This hints the intervening > +completion styles that they do not need to > +fontify (i.e. propertize with the `face' property) completion > +strings with highlights of the matching parts. If this is intended to be bound by frontends, why is it defvar-local? I thought let-binding buffer-local variables is a tricky business that could have unexpected results? Also, I think this doc string should reference completion-lazy-hilit-fn. > +(defvar completion-lazy-hilit-fn nil > + "Used by completions styles honoring `completion-lazy-hilit'. This should mention "function", since just "Used to..." doesn't convey that, and "-fn" could also mean "file name", not just "function". > +(defun completion-lazy-hilit (str) > + "Return a copy of completion STR that is `face'-propertized. ^^^^^^^^^^^^^^^^^^ Strange quoting. "face" is not a symbol that we want to have a link to, is it? I see a few more places in the doc strings that will "need work", but that can be done later. What did you want to say in NEWS about this? If it's just a performance improvement, we don't normally mention them in NEWS. Thanks.