summaryrefslogtreecommitdiffhomepage
path: root/custom
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-11-08 22:21:35 +0000
committerjao <jao@gnu.org>2025-11-08 22:21:35 +0000
commit816b371f2e7217438b82371f7a140634bed6ca8c (patch)
tree73ff974fc46d6a23c2b7f5eb2030b893cfad8910 /custom
parente1b778f5f5963ca02177875dea09f4a12d95741b (diff)
downloadelibs-816b371f2e7217438b82371f7a140634bed6ca8c.tar.gz
elibs-816b371f2e7217438b82371f7a140634bed6ca8c.tar.bz2
notmuch: better one pane
Diffstat (limited to 'custom')
-rw-r--r--custom/jao-custom-notmuch.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index dd0d4bd..92b9be0 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -511,19 +511,22 @@ ch--search-keys i)
(defun jao-notmuch-before-tree (&rest _args)
(window-configuration-to-register ?G)
- (when t ;; (string= (buffer-name) "*notmuch-hello*")
+ (when (string= (buffer-name) "*notmuch-hello*")
(when (< (frame-width) 230) (delete-other-windows))
(split-window-right 40)
(other-window 1)))
- (defvar jao-notmuch--visits 0)
-
(defun jao-notmuch-after-tree-quit (&optional _both)
(when (not (derived-mode-p 'notmuch-tree-mode 'notmuch-hello-mode))
(jump-to-register ?G)
(when (not (derived-mode-p 'notmuch-hello-mode))
- (jao-notmuch-notify-and-update)))
- (jao-notmuch-refresh-hello (= 0 (mod (cl-incf jao-notmuch--visits) 5))))
+ (jao-notmuch-notify-and-update))))
+
+ (defvar jao-notmuch--visits 0)
+
+ (defun jao-notmuch--maybe-notify-and-update (&optional _both)
+ (when (not (derived-mode-p 'notmuch-hello-mode 'notmuch-tree-mode))
+ (jao-notmuch-notify-and-update)))
(defun jao-notmuch-tree--sentinel (proc)
(when (eq (process-status proc) 'exit)
@@ -535,6 +538,7 @@ ch--search-keys i)
(jao-notmuch-thread-info-mode)))
(add-hook 'notmuch-tree-process-exit-functions #'jao-notmuch-tree--sentinel)
+ (advice-add 'notmuch-tree-quit :after #'jao-notmuch--maybe-notify-and-update)
(defun jao-notmuch-use-two-panes ()
(interactive)