diff options
| author | jao <jao@gnu.org> | 2026-06-20 17:04:58 +0100 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2026-06-20 17:07:26 +0100 |
| commit | 27a1b7a4358ef50bcabc0d98a747542c7750c7bf (patch) | |
| tree | 0c7eea44be76307bef9b0def7ef9ca4334643e66 | |
| parent | 137e12bed01bbc24e3172bacf7da8c1988339161 (diff) | |
| download | elibs-27a1b7a4358ef50bcabc0d98a747542c7750c7bf.tar.gz elibs-27a1b7a4358ef50bcabc0d98a747542c7750c7bf.tar.bz2 | |
notmuch tweaks
| -rw-r--r-- | custom/jao-custom-notmuch.el | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 2e46972..a48cd3a 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -50,11 +50,12 @@ (jao-when-darwin (when jao-notmuch-mac-xbar (jao-notmuch-xbar))) (jao-minibuffer-refresh))) -(defun jao-notmuch-notify-and-update () +(defun jao-notmuch-notify-and-update (&optional first agenda) (jao-notmuch-notify) (with-current-buffer "*notmuch-hello*" (notmuch-hello-update) - (jao-notmuch-hello-first))) + (when first (jao-notmuch-hello-first)) + (when agenda (jao-notmuch-refresh-agenda)))) (when jao-notmuch-enabled (jao-minibuffer-add-variable 'jao-notmuch-minibuffer-string -20)) @@ -483,7 +484,8 @@ ("count" . "%-7s ") ("authors" . "%-35s") ("subject" . " %-100s") - (jao-notmuch-format-tags . " (%s)")) + ;; (jao-notmuch-format-tags . " (%s)") + ) notmuch-search-buffer-name-format "*%s*" notmuch-saved-search-buffer-name-format "*%s*") :bind (:map notmuch-search-mode-map @@ -540,7 +542,8 @@ ;; (jao-notmuch-format-author . 25) (jao-notmuch-format-msg-ticks . ,jao-mails-regexp) (jao-notmuch-format-tree-and-subject . "%>-85s") - (jao-notmuch-format-tags . " (%s)")) + ;; (jao-notmuch-format-tags . " (%s)") + ) notmuch-unthreaded-result-format notmuch-search-result-format consult-notmuch-result-format `((jao-notmuch-format-msg-ticks . ,jao-mails-regexp) @@ -576,16 +579,10 @@ (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-notify-and-update t t))) (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)) - (jao-notmuch-refresh-hello)) - (defun jao-notmuch-tree--sentinel (proc) (when (eq (process-status proc) 'exit) (let ((inhibit-read-only t)) @@ -596,7 +593,6 @@ (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) @@ -610,7 +606,9 @@ (advice-remove 'notmuch-tree-quit #'jao-notmuch-after-tree-quit)) (when jao-notmuch-enabled - (jao-d-l (jao-notmuch-use-one-pane) (jao-notmuch-use-two-panes))) + ;; (jao-d-l (jao-notmuch-use-one-pane) (jao-notmuch-use-two-panes)) + (jao-notmuch-use-two-panes) + ) :bind (:map notmuch-tree-mode-map (("b" . jao-notmuch-browse-urls) |
