summaryrefslogtreecommitdiffhomepage
path: root/lib/net
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-08-19 01:47:38 +0100
committerjao <jao@gnu.org>2021-08-19 01:47:38 +0100
commita9f0f89c2496f631978dcb6c88da70a11ca1ab78 (patch)
tree83e46d0bbd924dc218d45dfff5dc70800b3e3c38 /lib/net
parentdb6c56811e26affb096d6921fd57a8d4d051c916 (diff)
downloadelibs-a9f0f89c2496f631978dcb6c88da70a11ca1ab78.tar.gz
elibs-a9f0f89c2496f631978dcb6c88da70a11ca1ab78.tar.bz2
jao-notmuch: little tweaks
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/jao-notmuch.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index 1bfabf6..6b88e80 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -245,19 +245,19 @@
(or (member "unread" ts) (member "new" ts))))
(defun jao-notmuch--unread-count ()
- (save-excursion
- (goto-char (point-min))
- (let ((p) (cnt) (total))
+ (let ((p) (cnt) (total))
+ (save-excursion
+ (goto-char (point-min))
(while (setq p (text-property-search-forward :notmuch-message-properties))
(unless cnt (setq cnt 0 total 0))
(setq total (1+ total))
(when (jao-notmuch--looking-at-new-p (prop-match-value p))
- (setq cnt (1+ cnt))))
- (when cnt (format "%s / %s messages" cnt total)))))
+ (setq cnt (1+ cnt)))))
+ (when cnt (format "[%s] %s left" total cnt))))
(defun jao-notmuch--tree-update-buffer-name (&optional n)
(when-let ((n (or n (jao-notmuch--unread-count))))
- (rename-buffer (format "%s - %s" (jao-notmuch--query-name) n))
+ (rename-buffer (format "%s %s" (jao-notmuch--query-name) n))
(jao-minibuffer-refresh)))
(defun jao-notmuch--tree-sentinel (proc &rest _)
@@ -294,7 +294,7 @@
(when and-show (notmuch-tree-show-message nil)))
(defun jao-notmuch-tree--next (prev thread no-exit)
- (let ((line-move-ignore-invisible t))
+ (let ((line-move-ignore-invisible nil))
(cond ((jao-notmuch--looking-at-new-p))
(thread
(when (notmuch-tree-next-thread prev)
@@ -303,8 +303,7 @@
((notmuch-tree-get-message-id)
(notmuch-tree-matching-message prev (not no-exit)))))
(when (notmuch-tree-get-message-id)
- (jao-notmuch-tree-hide-others)
- (notmuch-tree-show-message nil))
+ (jao-notmuch-tree-hide-others t))
(jao-notmuch--tree-update-buffer-name))
(defvar jao-notmuch-tree--prefix-map
@@ -342,7 +341,7 @@
(defun jao-notmuch--tree-sentinel (proc &rest _)
(when (eq (process-status proc) 'exit)
(jao-notmuch--tree-update-buffer-name)
- (jao-notmuch-tree-hide-others t)))
+ (jao-notmuch-tree-hide-others)))
(defun jao-notmuch-tree-setup (&optional prefix)
"Set up display of trees, with PREFIX key for outline commands."