Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates

From: Stefan Monnier <[email-masked]>
Date: Sun, 01 May 2022 13:36:11 -0400

Lars Ingebrigtsen [2022-05-01 19:26:58] wrote:
> Stefan Monnier <[email-masked]> writes:
>>> I don't remember why we're doing that, but I seem to vaguely recall that
>>> there's a reason...  Anybody?
>>
>> I'm pretty sure there's a reason, and I'm pretty sure this reason is
>> "sloppiness".  I blame the author of commit 1d00653d9e (and the author
>> of commit 14486c44 might be considered as an accessory to the crime).
>
> 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.

        Stefan