[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: |
Thu, 23 Apr 2015 17:43:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
jorge.alfaro-murillo@yale.edu (Jorge A.
Alfaro-Murillo) writes:
> (run-at-time nil 60
> (lambda ()
> (with-current-buffer " *Minibuf-0*"
> (erase-buffer)
> (insert (format-time-string "%H:%M")))))
I think one can afford to be a bit more generous with
updates than once every minute, so it will be (more)
in synch with the system time.
> (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.)
Possibly, Instead of the `dotimes' loop, examine if
`make-string' is more efficient, e.g.:
(make-string 10 ? ) ; 10 spaces
--
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 <=
- 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
- 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