From: Peng Li Date: Fri, 12 Jun 2015 15:18:16 +0000 (+0800) Subject: emacs - minibuffer show time X-Git-Url: http://47.100.26.94:8080/?a=commitdiff_plain;h=e08bd0a9ef949297bc38bdbaf0d03012a6a946e2;p=dotfiles.git emacs - minibuffer show time --- diff --git a/emacs.d/config/init-test-minibufer.el b/emacs.d/config/init-test-minibufer.el new file mode 100644 index 0000000..93e8e51 --- /dev/null +++ b/emacs.d/config/init-test-minibufer.el @@ -0,0 +1,29 @@ + +(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))))))))) +[nil 21872 33554 386400 1 (lambda nil (let (...) (if ... nil ...))) nil nil 0] + + + + + (with-current-buffer " *Minibuf-0*" + (insert (format-time-string "%H:%M"))) + + (run-at-time + nil 60 + (lambda () + (with-current-buffer " *Minibuf-0*" + (erase-buffer) + (dotimes (spaces (- (frame-width) 8)) + (insert " ")) + (insert (format-time-string "%H:%M"))))) +