From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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: Fri, 27 Oct 2023 18:41:34 +0300 Message-ID: References: <3d3f894f-a6fa-53ae-5d50-c3aa9bffc73e@daniel-mendler.de> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11814"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Daniel Mendler , Eli Zaretskii , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 47711@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 27 17:43:05 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 1qwOzI-0002rZ-Uy for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 17:43:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwOyo-0004T2-93; Fri, 27 Oct 2023 11:42:34 -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 1qwOyl-0004Sh-Dv for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2023 11:42:31 -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 1qwOyk-0007a5-P1 for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2023 11:42:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwOzF-0002kP-UA for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2023 11:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Oct 2023 15:43:01 +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.169842133710430 (code B ref 47711); Fri, 27 Oct 2023 15:43:01 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 27 Oct 2023 15:42:17 +0000 Original-Received: from localhost ([127.0.0.1]:36886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwOyX-0002i8-BF for submit@debbugs.gnu.org; Fri, 27 Oct 2023 11:42:17 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwOyV-0002hh-DZ for 47711@debbugs.gnu.org; Fri, 27 Oct 2023 11:42:16 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 855385C018A; Fri, 27 Oct 2023 11:41:38 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 27 Oct 2023 11:41:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698421298; x=1698507698; bh=OktNO0UgwmzqkT67Ko9pC7/Q3DYdXdbBrwF gkE9e8M0=; b=RzGomXAWXWy6X2ZEPKKoSrTD1iZIfzZ/f1oMN3KUw9mfWJYVDTQ rawOorTqnTp98c93oN315nnFhFMHpcXq9uI9VnVd7VY56N5k1SC8XmOaRx9ZpiAC BD5SWvaN34fwIFo4MnSEYMLDkv0ZkrnZYVxDsrdnt+MHdwhBNpaSz3sWwe16EZzp mqGqSvZoXk5tRnsz6C+4hroWxaJqt4PUBPWfzVDcG+YKfsx8XM+/UwAkgXcxCjle MCGFicQTODu1xBjkOXRTjjVsEqgAhnwCl4cMq//pU97LvfGJrgMqMZO2CbXkte9O He4gXKg5zsAvmUSfFEul4Jcf9sH1Qnv+Nog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698421298; x=1698507698; bh=OktNO0UgwmzqkT67Ko9pC7/Q3DYdXdbBrwF gkE9e8M0=; b=r0f7zCyTbSqf8xGVzn3l6Q0r1D2C34wKa94SeALnaIo/4QeiFdz ekzZHCaONEBBModRxl6Rk4n7hMGXENG6ruLXRS9GKLGKH3e2SLw6QGylhjA1A1Fq uWVQn+dUAZ+hWLb8FYQMf9g+ia34n0GwqfqUwtOE5yjlnBPaRmdzlzMOm7wLsIIY 2j7MWU/lX4gC+GWjxauObhYL3qAMOLm2XbPSZEvNP0qP3no5H7F1NebT7N8AziTX 9SiIPMf7bVbegK8i8U9i6w5mBqbGgg1sDhf9w+8shvf0O062pkFvvBtKFKrF32SB 7sJrZpHhQmckQcbb19QgfBIl6s+gbX9DdZg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleeggdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Oct 2023 11:41:36 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:273389 Archived-At: On 27/10/2023 16:46, Stefan Monnier wrote: >> BTW, all-completion's docstring also says that a COLLECTION that is >> a function should itself handle completion-regexp-list, > The key here is "should": we know how well ELisp coders follow > such recommendations. We could, for example, have a period when we warn about returned non-matches. string-match-p is not free, but it's not very expensive either. I think we should fix the discrepancy between the doc and the behavior, one way or another. If the function does obey the current phrasing, it seems like it's doing extra work if we post-filter anyway, producing extra cosing (though the result might still be beneficial if that filtering results in a much smaller list on the first try). But third-party callers of all-completions might also see the doc and decide to use completion-regexp-list, with mixed results. That seems like a pure downside.