[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minibuffer tray to display current time and date
From: |
Michael Heerdegen |
Subject: |
Re: Minibuffer tray to display current time and date |
Date: |
Wed, 22 Apr 2015 18:57:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Alexander Shukaev <haroogan@gmail.com> writes:
> That's the thing, mode line would be too cluttered then. In
> particular, when splits are used, there is no reason to duplicate such
> global information as current time and date. That's why I think
> placing them into minibuffer might be a good idea.
>From what you were saying, I think you mean to display the time in the
echo area, not the minibuffer.
That could simply be done using `message'. One should take care of not
cluttering *Messages* and avoid erasing other messages.
I would try starting like this:
--8<---------------cut here---------------start------------->8---
(progn
(defvar current-time-string "")
(run-with-timer
1 1
(lambda ()
(let ((message-log-max nil))
(unless (minibuffer-window-active-p (minibuffer-window))
(when (member (current-message)
(list current-time-string nil))
(message "%s" (setq current-time-string
(current-time-string)))))))))
--8<---------------cut here---------------end--------------->8---
Alignment and combining with other messages could be done too.
Just an idea, admittedly this code is not super elegant.
Michael.
- Minibuffer tray to display current time and date, Alexander Shukaev, 2015/04/22
- Re: Minibuffer tray to display current time and date, Eli Zaretskii, 2015/04/22
- Re: Minibuffer tray to display current time and date, Stefan Monnier, 2015/04/22
- Message not available
- Re: Minibuffer tray to display current time and date, Emanuel Berg, 2015/04/22
- Re: Minibuffer tray to display current time and date, Jorge A. Alfaro-Murillo, 2015/04/23
- Message not available
- Re: Minibuffer tray to display current time and date, Emanuel Berg, 2015/04/23
- Re: Minibuffer tray to display current time and date, Jorge A. Alfaro-Murillo, 2015/04/23
- Message not available
- Re: Minibuffer tray to display current time and date, Emanuel Berg, 2015/04/23
- Re: Minibuffer tray to display current time and date, tomas, 2015/04/24
- Re: Minibuffer tray to display current time and date, Eli Zaretskii, 2015/04/24
- Re: Minibuffer tray to display current time and date, Jorge A. Alfaro-Murillo, 2015/04/24
- Re: Minibuffer tray to display current time and date, Eli Zaretskii, 2015/04/24