* bug#26291: In mode-line-format, `:propertize' drops some existing text properties
@ 2017-03-28 23:42 Clément Pit-Claudel
2017-03-29 14:28 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Clément Pit-Claudel @ 2017-03-28 23:42 UTC (permalink / raw)
To: 26291
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#26291: In mode-line-format, `:propertize' drops some existing text properties
2017-03-28 23:42 bug#26291: In mode-line-format, `:propertize' drops some existing text properties Clément Pit-Claudel
@ 2017-03-29 14:28 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2017-03-29 14:28 UTC (permalink / raw)
To: Clément Pit-Claudel; +Cc: 26291
> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
> Date: Tue, 28 Mar 2017 19:42:02 -0400
>
> (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?
Which docs were you reading that led you to believe the above should
work?
(And btw, why did you use backticks here? I don't think they are
needed in this case.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-29 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 23:42 bug#26291: In mode-line-format, `:propertize' drops some existing text properties Clément Pit-Claudel
2017-03-29 14:28 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.