diff options
author | jao <jao@gnu.org> | 2020-09-21 22:33:28 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-09-21 22:33:28 +0100 |
commit | e039ef8c8e8b067138951581ef6707a291a548d3 (patch) | |
tree | 70ed9cb5e7ca340f1cb83fd07ae223b87107ef87 | |
parent | 3d16cff6224f67f214de4e0cfcc70cdad22da88e (diff) | |
download | elibs-e039ef8c8e8b067138951581ef6707a291a548d3.tar.gz elibs-e039ef8c8e8b067138951581ef6707a291a548d3.tar.bz2 |
Richer echo buffer for maildir tracker
-rw-r--r-- | net/jao-maildir.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net/jao-maildir.el b/net/jao-maildir.el index 12c534a..421f8b3 100644 --- a/net/jao-maildir.el +++ b/net/jao-maildir.el @@ -46,6 +46,18 @@ (defvar jao-maildir-tracked-maildirs) (defvar jao-maildir-mode-line-string "") +(defvar jao-maildir-additional-info ()) + +(defun jao-maildir-refresh-echo () + (with-current-buffer " *Minibuf-0*" + (erase-buffer) + (let ((mailp (not (string-blank-p jao-maildir-mode-line-string)))) + (when (or mailp infop) + (insert (format "%s%s%s" + (if mailp "Mail" "") + (if mailp jao-maildir-mode-line-string "") + (or (format-mode-line jao-maildir-additional-info) + ""))))))) (defun jao-maildir--update-mode-line-string () (let ((total 0) @@ -62,11 +74,7 @@ 'face 'font-lock-function-name-face)) (s (if (string-empty-p s) s (concat s " ")))) (setq jao-maildir-mode-line-string (format "%s%s" total s)) - (when jao-maildir-echo-p - (with-current-buffer " *Minibuf-0*" - (erase-buffer) - (when (not (string-blank-p jao-maildir-mode-line-string)) - (insert (format "Mail %s" jao-maildir-mode-line-string))))) + (when jao-maildir-echo-p (jao-maildir-refresh-echo)) (force-mode-line-update t)))) (defvar jao-maildir--watches nil) |