From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: 26291@debbugs.gnu.org
Subject: bug#26291: In mode-line-format, `:propertize' drops some existing text properties
Date: Wed, 29 Mar 2017 17:28:34 +0300 [thread overview]
Message-ID: <83inms6tt9.fsf@gnu.org> (raw)
In-Reply-To: <8f9200e4-1361-fd15-7c43-fabfa5df4179@gmail.com> (message from Clément Pit-Claudel on Tue, 28 Mar 2017 19:42:02 -0400)
> 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.)
prev parent reply other threads:[~2017-03-29 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83inms6tt9.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=26291@debbugs.gnu.org \
--cc=cpitclaudel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.