[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minibuffer tray to display current time and date
From: |
Emanuel Berg |
Subject: |
Re: Minibuffer tray to display current time and date |
Date: |
Fri, 24 Apr 2015 00:46:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
jorge.alfaro-murillo@yale.edu (Jorge A.
Alfaro-Murillo) writes:
> Optimal would be to run now, and then (run-at-time
> NEXT-TIME-MINUTE-CHANGES nil (lambda () (run-at-time
> t 60 ...
Are you thinking like this: "The granularity of the
clock is 1 minute. So it should be updated once every
minute, i.e. every 60 seconds."
That sounds a bit risky to me, so I'd recommend setting
it so that it will be set somewhere around three times
per minute - and not set evenly so, but for example
every 22 seconds:
0, 22, 44, 6 (66), 28, 50, ...
>>> (run-at-time nil 60 (lambda ()
>>> (with-current-buffer " *Minibuf-0*"
>>> (erase-buffer) (dotimes (spaces (- (frame-width)
>>> 5)) (insert " ")) (insert (format-time-string
>>> "%H:%M")))))
>>
>> I need to subtract 6 for it to fit. (The time
>> string itself is five chars.)
>
> It works with 5 for me, the last character is at the
> last column.
In X it works with 5. In the Linux VTs and in xterm
with '-nw' it needs 6.
--
underground experts united
http://user.it.uu.se/~embe8573
- 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 <=
- 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
- Re: Minibuffer tray to display current time and date, Jorge A. Alfaro-Murillo, 2015/04/24
- Message not available
- Re: Minibuffer tray to display current time and date, Dan Espen, 2015/04/24
- Re: Minibuffer tray to display current time and date, Jorge A. Alfaro-Murillo, 2015/04/25
- Re: Minibuffer tray to display current time and date, Eli Zaretskii, 2015/04/26
- Re: Minibuffer tray to display current time and date, tomas, 2015/04/26
- Re: Minibuffer tray to display current time and date, Eli Zaretskii, 2015/04/26