From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#47711: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting Date: Mon, 16 Aug 2021 10:47:06 +0200 Message-ID: <1d8ac48c-1627-cfa0-640c-9c1371612787@daniel-mendler.de> 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> <83im08bjc3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4252"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47711@debbugs.gnu.org, monnier@iro.umontreal.ca, joaotavora@gmail.com, 48841@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 16 10:48:44 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 1mFYIW-0000r4-3S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Aug 2021 10:48:44 +0200 Original-Received: from localhost ([::1]:58242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFYIU-0002aL-Jx for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Aug 2021 04:48:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFYHq-0001v2-KS for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 04:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFYHq-0003RX-4o for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 04:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFYHq-0003Pk-1N for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 04:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Aug 2021 08:48: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.162910365013082 (code B ref 47711); Mon, 16 Aug 2021 08:48:01 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 16 Aug 2021 08:47:30 +0000 Original-Received: from localhost ([127.0.0.1]:48432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFYHG-0003On-88 for submit@debbugs.gnu.org; Mon, 16 Aug 2021 04:47:30 -0400 Original-Received: from server.qxqx.de ([178.63.65.180]:58513 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFYH6-0003OM-6C; Mon, 16 Aug 2021 04:47:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DXzv+Bnip6z/cdxMuTfEFoOWdakNTpWYQig4GgvIjnQ=; b=SSb5x9ZQ8ZsoUGdP+4TKoqrmPu ZYbOzyMx0c2frl89WsNnyvckcXnI8XtekCQ7ngPYb/Gy4u7jhZmLioX5utXVEh9JpCKi5V4Dlvama vU534OzP73bchDa85/UD87Ofk9BEUOkTgly/TVFZR7Q3P8TYwOPHHO3IvPry6oxzNsl8=; In-Reply-To: <83im08bjc3.fsf@gnu.org> Content-Language: en-US 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:211971 Archived-At: On 8/14/21 9:01 AM, Eli Zaretskii wrote: > Just to make sure we are on the same page: adding a text property to a > string doesn't mutate a string. Lisp programs that process these > strings will not necessarily see any difference, and displaying those > strings will also not show any difference if the property is not > related to display. So the assumption that seems to be made here, > that adding a property is the same as mutating a string, is IMO > inaccurate if not incorrect. While I agree that adding text properties is not mutation of the string text itself it still mutates the string data structure. Dmitry made a good point about this - if a completion table uses obarray as backend to the completion table you suddenly attach text properties to symbol names. This is not a good idea. I actually had such an issue once in a package I developed, where I accidentally attached text properties (via the mutating put-text-property API) to some strings I didn't own. This lead to unexpected side effects at other places where I didn't expect the strings to have properties attached. Daniel