GNU bug report logs -
#28595
In mode-line-format, `:propertize' drops some existing text properties
Previous Next
Reported by: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
Date: Mon, 25 Sep 2017 12:48:02 UTC
Severity: minor
Tags: moreinfo
Merged with 26291
Found in version 26.0.60
Fixed in version 26.1
Done: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 26 Sep 2017 01:10:40 +0200
with message-id <23591a71-d89d-1a61-cc7b-5ca448103b39 <at> live.com>
and subject line Re: bug#28595: In mode-line-format, `:propertize' drops some existing text properties
has caused the debbugs.gnu.org bug report #28595,
regarding In mode-line-format, `:propertize' drops some existing text properties
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
28595: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28595
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
On 2017-09-25 20:52, Eli Zaretskii wrote:
> On September 24, 2017 2:03:02 PM GMT+01:00, "Clément Pit--Claudel" <clement.pitclaudel <at> live.com> 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.
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 7 years and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.