bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55205: 28.1.50; completion--replace illegally mutates completion can


From: Stefan Monnier
Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates
Date: Sun, 01 May 2022 14:34:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen [2022-05-01 19:48:16] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]