|
From: | Jorge A. Alfaro-Murillo |
Subject: | Re: Minibuffer tray to display current time and date |
Date: | Thu, 23 Apr 2015 11:15:23 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Emanuel Berg writes:
Stefan Monnier <monnier@iro.umontreal.ca> writes:M-: (with-current-buffer " *Minibuf-0*" (insert "I'm Idle!")) RETSo then it should be as simple as: (with-current-buffer " *Minibuf-0*" (insert (format-time-string "%H:%M")))
You should also delete the content of the mini-buffer before inserting.
Do you then use the idle-timer or how do you update it so it won't freeze time and make everything stop around you?
This works: #+BEGIN_SRC emacs-lisp (run-at-time nil 60 (lambda () (with-current-buffer " *Minibuf-0*" (erase-buffer) (insert (format-time-string "%H:%M"))))) #+END_SRC Or you could have it on the right bottom: #+BEGIN_SRC emacs-lisp (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"))))) #+END_SRC Best, -- Jorge.
[Prev in Thread] | Current Thread | [Next in Thread] |