bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20592: the `display' property messes the `face' properties after `co


From: Alexander Shukaev
Subject: bug#20592: the `display' property messes the `face' properties after `concat'
Date: Sun, 17 May 2015 01:58:29 +0200

Following the "Minibuffer tray to display current time and date" discussion, it seems that a bug with the `display' property.  Consider the following code:

  (setq-default minibuffer-line-format
                '((:eval (propertize (format-time-string "%Y.%m.%d")
                                     'face
                                     'minibuffer-line-date))
                  " "
                  (:eval (propertize (format-time-string "%A")
                                     'face
                                     'minibuffer-line-weekday))
                  " "
                  (:eval (propertize (format-time-string "%R")
                                     'face
                                     'minibuffer-line-time))))

It works as expected.

Consider another piece of code:

  (setq-default minibuffer-line-format
                `((:eval
                   (let ((string (concat
                                  (propertize (format-time-string "%Y.%m.%d")
                                              'face
                                              'minibuffer-line-date)
                                  " "
                                  (propertize (format-time-string "%A")
                                              'face
                                              'minibuffer-line-weekday)
                                  " "
                                  (propertize (format-time-string "%R")
                                              'face
                                              'minibuffer-line-time))))
                     (concat (propertize " "
                                         'display
                                         `((space :align-to
                                                  (- right
                                                     right-fringe
                                                     ,(length string)))))
                             string)))))

Alignment works as expected, but faces are messed up.  In fact, the default face is used everywhere (which comes from the `display' property), like if subsequent propertizings of date, weekday, and time have never been there.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]