GNU bug report logs - #20592
the `display' property messes the `face' properties after `concat'

Previous Next

Package: emacs;

Reported by: Alexander Shukaev <haroogan <at> gmail.com>

Date: Sat, 16 May 2015 23:59:02 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alexander Shukaev <haroogan <at> gmail.com>
To: 20592 <at> debbugs.gnu.org
Subject: bug#20592: the `display' property messes the `face' properties after `concat'
Date: Sun, 17 May 2015 01:58:29 +0200
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.