GNU bug report logs - #8897
`completion--insert-strings' clobbers user-added text properties

Previous Next

Package: emacs;

Reported by: Štěpán Němec <stepnem <at> gmail.com>

Date: Sun, 19 Jun 2011 18:28:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 8897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 8897 <at> debbugs.gnu.org
Subject: Re: bug#8897: `completion--insert-strings' clobbers user-added text
 properties
Date: Mon, 14 Sep 2020 14:25:02 +0200
Štěpán Němec <stepnem <at> gmail.com> 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




This bug report was last modified 4 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.