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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 01 May 2022 15:17:10 +0300

> Resent-From: Lars Ingebrigtsen <[email-masked]>
> Original-Sender: "Debbugs-submit" <[email-masked]>
> Resent-CC: [email-masked]
> Resent-Sender: [email-masked]
> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sun, 01 May 2022 13:53:59 +0200
> Cc: Stefan Monnier <[email-masked]>, [email-masked]
> 
> Daniel Mendler <[email-masked]> writes:
> 
> > The function completion--replace mutates the replacement string, it
> > strips the text properties.
> 
> I don't think that's, strictly speaking, illegal.  :-)
> 
> Anyway, I agree that it's unfortunate that completion destructively
> modifies the strings it's handed, and this has been discussed
> extensively over the years (and there's probably several bug reports
> open about that, although I can't find them now).
> 
> I don't remember why we're doing that, but I seem to vaguely recall that
> there's a reason...  Anybody?

I don't understand how can completion work in general without
destructively modifying strings.  Isn't that obvious?