GNU bug report logs - #17052
substitute-command-keys strips text properties

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Thu, 20 Mar 2014 16:23:01 UTC

Severity: wishlist

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: lekktu <at> gmail.com, stefan <at> marxist.se, 8951 <at> debbugs.gnu.org,
 17052 <at> debbugs.gnu.org
Subject: Re: bug#17052: substitute-command-keys strips text properties
Date: Mon, 19 Aug 2019 18:27:32 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Stefan Kangas <stefan <at> marxist.se>,  17052 <at> debbugs.gnu.org,
>   lekktu <at> gmail.com,  8951 <at> debbugs.gnu.org
> Date: Sun, 18 Aug 2019 15:43:35 -0700
> 
> But if you look at that function in particular, it's written in a very
> C-ey fashion, what with copying over characters one by one etc.  It
> could be rewritten (in C) to use the proper primitives we have that
> preserve text properties (Fsubstring etc), but then you'd just end up
> with a more long-winded version that would be Lisp-in-C, so we might as
> well just rewrite it in Lisp.

AFAIU, the problematic parts are not those which copy characters one
by one, the problematic parts are those which _substitute_ one text
with another.  In that case, you need to adjust the text properties or
cons them out of thin air.




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

Previous Next


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