Subject: Re: bug#23730: 24.5; format removes text properties

From: Eli Zaretskii <[email-masked]>
Date: Wed, 08 Jun 2016 19:57:10 +0300

> From: [email-masked]
> Date: Wed, 08 Jun 2016 22:41:46 +0900
> 
> 
> `format' may remove text properties.
> Second form is an example.
> 
> (format (propertize "%d" 'face '(:background "red")) 1)
> =>#("1" 0 1 (face (:background "red")))
> 
> (format (propertize "%2d" 'face '(:background "red")) 1)
> =>" 1"
> 
> (format (propertize "%02d" 'face '(:background "red")) 1)
> =>#("01" 0 2 (face (:background "red")))

Why did you expect the properties of the format specifier to be
preserved?  The documentation only promises that the characters
_other_ than the format specifier are copied with their properties,
but makes no such promises about the specifier.

IOW, this is the intended behavior.  If you want the result of the
conversion to have some properties, you should propertize the return
value.