summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-10-16 23:41:23 +0100
committerjao <jao@gnu.org>2026-10-16 23:45:09 +0100
commitc55eacb97537c988721badec2f7676e5fd2f4830 (patch)
treed99bf02e36f61838d528d4f8d19606dfb32cd021
parent9b0add5b277dc5b2cfacb71957da91228adfb22d (diff)
downloadelibs-c55eacb97537c988721badec2f7676e5fd2f4830.tar.gz
elibs-c55eacb97537c988721badec2f7676e5fd2f4830.tar.bz2
notmuch: nicer hello
-rw-r--r--custom/jao-custom-notmuch.el13
-rw-r--r--lib/net/jao-notmuch.el5
2 files changed, 14 insertions, 4 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index 0cb60e7..6b5be84 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -106,10 +106,14 @@
(+ c (or (plist-get q :count) 0)))
searches
0)))
- (title (if title (format "[ %d %s ]\n\n" cnt title) "\n"))
+ (title (when title (format "%d %s" cnt title)))
(notmuch-column-control 1.0))
- (widget-insert (propertize title 'face 'jao-themes-f00))
- (notmuch-hello-insert-buttons searches))))
+ (when title
+ (widget-insert (propertize title 'face 'jao-themes-f00))
+ (newline)
+ (jao-notmuch-hbar 5))
+ (notmuch-hello-insert-buttons searches)
+ (newline))))
(defun jao-notmuch--replace (lst s)
(let ((name (plist-get s :name)))
@@ -339,7 +343,8 @@
(unless (widget-at) (jao-notmuch-hello-first))
(jao-minibuffer-refresh))))
-(defvar jao-notmuch-hello--sec-rx "^\\(\\[ [0-9]+\\|All tags:.+\\)")
+;; (defvar jao-notmuch-hello--sec-rx "^\\(\\[ [0-9]+\\|All tags:.+\\)")
+(defvar jao-notmuch-hello--sec-rx "^[0-9]+ .+")
(defun jao-notmuch-hello-next-section ()
(interactive)
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index 254e4b2..f7829e5 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -409,6 +409,11 @@
(t " "))))
(provide 'jao-notmuch)
+;;; bars
+(defun jao-notmuch-hbar (margin)
+ (widget-insert (propertize (make-string (- (window-width) margin) ?—)
+ 'face '(:foreground "grey80")))
+ (newline))
;;; org links
(defun jao-notmuch-id-file-name (id)
(let ((cmd (format "notmuch search --output=files id:%s" id)))