Subject: bug#26291: closed (Re: bug#28595: In mode-line-format, `:propertize' drops some existing text properties)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 26 Sep 2017 14:34:03 +0000

Your bug report

#28595: In mode-line-format, `:propertize' drops some existing text properties

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28595: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28595
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28595: In mode-line-format, `:propertize' drops some existing text properties
From: Clément Pit--Claudel <[email-masked]>
To: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
Date: Tue, 26 Sep 2017 01:10:40 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On 2017-09-25 20:52, Eli Zaretskii wrote:
> On September 24, 2017 2:03:02 PM GMT+01:00, "Clément Pit--Claudel" <[email-masked]> wrote:
>> Hi all,
>>
>> Based on the docs, the three following forms should yield the same
>> results:
>>
>> (format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
>> (format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
>> (format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
>>
>> But they don't:
>>
>> (format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
>> => #("AB" 0 2 (y 0)) ;; x 0 is dropped
>>
>> (format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
>> ⇒ #("AB" 0 1 (y 0) 1 2 (x 0)) ;; y 0 is dropped on 1..2
>>
>> (format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
>> ⇒ #("AB" 0 1 (y 0) 1 2 (y 0 x 0)) ;; Seems right
>>
>> Am I misreading the docs?
>> Clément.
> 
> You already asked the same in bug#26291.

Ouch. Sorry.

Subject: In mode-line-format, `:propertize' drops some existing text properties
From: Clément Pit-Claudel <[email-masked]>
To: [email-masked]
Date: Tue, 28 Mar 2017 19:42:02 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi all,

Based on the docs, the three following forms should yield the same results:

(format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
(format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
(format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))

But they don't:

(format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
=> #("AB" 0 2 (y 0)) ;; x 0 is dropped

(format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
⇒ #("AB" 0 1 (y 0) 1 2 (x 0)) ;; y 0 is dropped on 1..2

(format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
⇒ #("AB" 0 1 (y 0) 1 2 (y 0 x 0)) ;; Seems right

Am I misreading the docs?
Clément.