Subject: Re: bug#8897: `completion--insert-strings' clobbers user-added text properties

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 14 Sep 2020 14:25:02 +0200

Štěpán Němec <[email-masked]> writes:

> It is possible to bind `completion-annotate-function' to add custom
> annotations, which is great. Unfortunately, the `face' and `mouse-face'
> text properties added by such a function are then unconditionally
> overwritten by `completion--insert-strings'.
>
> In my particular case I define annotations as buttons (which display
> even more detail about a completion value upon activation), so a visual
> indication of clickability is very important for me.
>
> I wonder if something like the patch below, which fixes the problem for
> me, could be applied?

In conjunction with bug#43218, completion no longer clobbers all text
properties (but it does clobber the face text property).  So it still
requires some wrangling by the caller if the text property was the one
they wanted to have preserved, but the caller can stash that in a
different text property.

This requires that `minibuffer-allow-text-properties' is non-nil.

So I think that basically takes care of the problem described here, and
I'm closing this bug report.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no