Take a look at this example:
(format (concat "%s" (propertize "%s" 'face 'error)) "foo" "bar")
"foobar"
(format (concat "%s " (propertize "%s" 'face 'error)) "foo" "bar")
#("foo bar" 4 7 (face error))
And the documentation of format
explicitly states:
Text properties, if any, are copied from the format-string to the produced text.
Why is that?
I know I can work around this with:
(format "%s%s" "foo" (propertize "bar" 'face 'error))
#("foobar" 3 6 (face error))
Or even:
(concat "foo" (propertize "bar" 'face 'error))
#("foobar" 3 6 (face error))
But my original use case is a bit more complex than this.
Edit
A probably more general example is the following:
(format (concat (propertize "%s" 'face 'bold)
"" ; any non-empty string works
(propertize "%s" 'face 'error))
"foo" "bar")
#("foobar" 0 6 (face bold))
M-x report-emacs-bug
.(format (propertize "\s%s" 'face 'error) "foo")
gives#(" foo" 0 4 (face error))
.