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: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting Date: Mon, 16 Aug 2021 14:57:01 +0300 Message-ID: <83pmud8uwi.fsf@gnu.org> References: <3d3f894f-a6fa-53ae-5d50-c3aa9bffc73e@daniel-mendler.de> <56ab18b1-4348-9b2c-85bb-af9b76cd429a@daniel-mendler.de> <38a06f3c-4a7a-755c-c99b-708f91afabfa@daniel-mendler.de> <9f59f87c-2489-aaa0-5b3f-0e911b7ffa6c@daniel-mendler.de> <8a36e61a-1c5b-bf3b-a454-077348589c4f@yandex.ru> <83h7fsbitl.fsf@gnu.org> <75ce4b68-240f-2f0e-3953-c1f74962c3cd@daniel-mendler.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23498"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, monnier@iro.umontreal.ca, joaotavora@gmail.com, 48841@debbugs.gnu.org, 47711@debbugs.gnu.org To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 16 13:58:09 2021 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 1mFbFp-0005qV-AD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Aug 2021 13:58:09 +0200 Original-Received: from localhost ([::1]:53788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFbFn-000556-FG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Aug 2021 07:58:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFbFi-00054M-0F for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 07:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFbFh-00087h-OD for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 07:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFbFh-0002Ub-Nj for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 07:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Aug 2021 11:58: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.16291150369496 (code B ref 47711); Mon, 16 Aug 2021 11:58:01 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 16 Aug 2021 11:57:16 +0000 Original-Received: from localhost ([127.0.0.1]:48686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFbEy-0002T3-DN for submit@debbugs.gnu.org; Mon, 16 Aug 2021 07:57:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFbEw-0002Se-Kt; Mon, 16 Aug 2021 07:57:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44788) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFbEq-0007if-P5; Mon, 16 Aug 2021 07:57:08 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2716 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFbEq-0004Nk-CS; Mon, 16 Aug 2021 07:57:08 -0400 In-Reply-To: <75ce4b68-240f-2f0e-3953-c1f74962c3cd@daniel-mendler.de> (message from Daniel Mendler on Mon, 16 Aug 2021 10:48:19 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:211988 Archived-At: > Cc: joaotavora@gmail.com, monnier@iro.umontreal.ca, 48841@debbugs.gnu.org, > 47711@debbugs.gnu.org > From: Daniel Mendler > Date: Mon, 16 Aug 2021 10:48:19 +0200 > > On 8/14/21 9:12 AM, Eli Zaretskii wrote: > >> Since up until now completion-pcm--hilit-commonality copied all strings > >> before modifying, completion tables such as described (with "shared" > >> strings) have all been "legal". Suddenly deciding to stop supporting > >> them would be a major API breakage with consequences that are hard to > >> predict. And while I perhaps agree that it's an inconvenience, I don't > >> think it's a choice we can simply make as this stage in c-a-p-f's > >> development. > > > > This sounds like an argument against Daniel's approach as well, no? > > Because if a completion API returns strings it "doesn't own", there > > will be restrictions on Lisp programs that use those strings, because > > those Lisp programs previously could do anything they liked with those > > strings, and now they cannot. Or am I missing something? > > No, in my patch the displayed candidate strings are still copied before > the text properties are attached. The strings are kept intact as they > are now. I was talking about the infrastructure that produces the completion candidates, not about the application that uses them. My point is that your approach requires the applications using the candidates to copy them, whereas previously they could use them without copying.