From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates Date: Sun, 01 May 2022 14:34:34 -0400 Message-ID: References: <4d1b8687-20f2-137a-2739-7bba28828991@daniel-mendler.de> <87wnf5mpt4.fsf@gnus.org> <87k0b5duzh.fsf@gnus.org> <87fsltdtzz.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10714"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Daniel Mendler , 55205@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 01 20:35:12 2022 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 1nlEPW-0002ZK-MV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 20:35:10 +0200 Original-Received: from localhost ([::1]:47828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlEPV-0008Kx-CJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 14:35:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlEPO-0008Kn-Jt for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 14:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40278) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlEPO-00030S-Ar for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 14:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlEPO-0003pq-6v for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 14:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 May 2022 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55205 X-GNU-PR-Package: emacs Original-Received: via spool by 55205-submit@debbugs.gnu.org id=B55205.165143009014721 (code B ref 55205); Sun, 01 May 2022 18:35:02 +0000 Original-Received: (at 55205) by debbugs.gnu.org; 1 May 2022 18:34:50 +0000 Original-Received: from localhost ([127.0.0.1]:34175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlEPB-0003pM-MV for submit@debbugs.gnu.org; Sun, 01 May 2022 14:34:49 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlEP9-0003p7-EM for 55205@debbugs.gnu.org; Sun, 01 May 2022 14:34:47 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A1DF9100280; Sun, 1 May 2022 14:34:41 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id F24541000C4; Sun, 1 May 2022 14:34:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651430075; bh=aZ7dRxotARB5Frx9G8+yGC/YqSU5HY6RS/rLfi4/o7Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=B81zLXWri63QmIQoK+8tgRbJpwChCyLqoaO6EihiJni1uLuJbb4wcvWvnTVTj6rj9 HFtcp4wdyG+A0ARoz0oLGUhjQLuxaJW7x7DxOj/dsIW9/aQvVcPzuuYzN2kGRH6jMj rZ3wITJd4fa6Lln43AsMhfmCQisvGPPB8N7TkNCjuT5cUEfP6K4pv8/BpwJFYXSBMJ BsutU9jyLnNmLPiNB4NXmM9jT4Qz5YjAtJOHVVm0/DstGeh0naUWOg+C6Lfj58Fv3p c1AjMVwnyq1TLEDNNFhpDL9O0KecTfjcu2Iy2B66HF1znHryzQoai/fPPWJIYo1NB/ cOqthqYhpLOwA== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BF356120263; Sun, 1 May 2022 14:34:35 -0400 (EDT) In-Reply-To: <87fsltdtzz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 01 May 2022 19:48:16 +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:231190 Archived-At: Lars Ingebrigtsen [2022-05-01 19:48:16] wrote: > Stefan Monnier writes: >>> Is there no way to let the text properties survive completion? Because >>> that's also come up more than a few times. >> Not sure what you mean by that. >> I suspect that the details depend a lot on where the completion string >> comes from. Already the current code's check for >> `minibuffer-allow-text-properties` seems too coarse since it is used >> even when the completion is inserted into a normal buffer. > I mean -- don't alter any of the strings the completion machinery is > fed, but return them as is. `completion-replace` doesn't return anything, it just inserts the string, and as the comment explains, in a common use case that string it receives includes things like the `completion-first` face which is out of place at the destination, so there's clearly a need to remove some properties sometimes. How best to do that of course depends on which other properties we might want to keep and when. Stefan