[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minibuffer tray to display current time and date
From: |
Alexander Shukaev |
Subject: |
Re: Minibuffer tray to display current time and date |
Date: |
Wed, 6 May 2015 12:31:32 +0200 |
I don't like bumping personally, but maybe somebody else (except Eli and
Stefan) knows the answer? Thanks in advance.
Regards,
Alexander
On Fri, May 1, 2015 at 6:54 AM, Alexander Shukaev <haroogan@gmail.com>
wrote:
> The only stanza that works properly so far is this simple one:
>
> (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))))
>
> So how do I actually right justify that now?
>
> On Fri, May 1, 2015 at 6:49 AM, Alexander Shukaev <haroogan@gmail.com>
> wrote:
>
>> I came up with the following code to right-justify:
>>
>> (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
>> (length ,string)))))
>> string)))))
>>
>> But it does not do what it should do. Faces are not propagated and
>> alignment too. What's wrong with this code?
>>
>
>