diff options
author | jao <jao@gnu.org> | 2022-09-26 23:52:01 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-26 23:52:01 +0100 |
commit | 1a6b9ba762fddc95bce00dc1a94dfd10c24dee60 (patch) | |
tree | 0c4c2fa5ae3e508ce329a57ff967946e1fb7fab6 /custom | |
parent | 3f062f8fcf7882c4ed035cb2b4651e72e342d3c8 (diff) | |
download | elibs-1a6b9ba762fddc95bce00dc1a94dfd10c24dee60.tar.gz elibs-1a6b9ba762fddc95bce00dc1a94dfd10c24dee60.tar.bz2 |
back to the future: using notmuch-tree-outline as submitted
Diffstat (limited to 'custom')
-rw-r--r-- | custom/jao-custom-notmuch.el | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 5b6601c..731a277 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -148,6 +148,9 @@ (jao-notmuch-def-searches dynamic `(,(jao-notmuch--q "new" nil "nn" '("tag:new" "not tag:draft")) ,(jao-notmuch--q "jao" "drafts" "d" '("tag:draft")) + ,(jao-notmuch--q "bml" "sent-today" "ts" + '("tag:bigml" "date:24h.." "tag:sent")) + ,(jao-notmuch--q "jao" "sent-today" "tS" '("tag:jao" "date:24h.." "tag:sent")) ,(jao-notmuch--q "bml" "today" "tb" '("tag:bigml" "date:24h..")) ,(jao-notmuch--q "jao" "today" "tj" '("tag:jao" "date:24h.." @@ -161,7 +164,9 @@ '("feeds" "hacking" "bills" "jao"))) (jao-notmuch-def-searches nil - '((:query "not tag:gmane" :name "email") + '((:query "tag:sent and tag:bigml" :name "bigml/sent") + (:query "tag:sent and not tag:bigml" :name "jao/sent") + (:query "not tag:gmane" :name "email") (:query "tag:gmane" :name "gmane") (:query "*" :name "messages"))) @@ -459,15 +464,16 @@ ;; '((prefix . " ") (top . " ") (top-tee . " ") ;; (vertical . " ") (vertical-tee . " ") (bottom . " ") ;; (arrow . "")) - ) + notmuch-tree-outline-enabled t + notmuch-tree-outline-visibility 'hide-others + notmuch-tree-outline-auto-close t + notmuch-tree-outline-open-on-next t) :config (when (display-graphic-p) (jao-notmuch-adjust-tree-fonts (when (string-prefix-p "Hack" jao-themes-default-face) "Source Code Pro"))) - (jao-notmuch-tree-setup "T") - (defun jao-notmuch-before-tree (&rest args) (when (string= (buffer-name) "*notmuch-hello*") (split-window-right 40) @@ -482,6 +488,16 @@ (delete-window) (jao-notmuch-refresh-hello (= 0 (mod (cl-incf jao-notmuch--visits) 100))))) + (defun jao-notmuch-tree--sentinel (proc) + (when (eq (process-status proc) 'exit) + (let ((inhibit-read-only t)) + (save-excursion + (goto-char (point-max)) + (when (re-search-backward "^End of search results." nil t) + (delete-line)))))) + + (add-hook 'notmuch-tree-process-exit-functions #'jao-notmuch-tree--sentinel) + (advice-add 'notmuch-tree :before #'jao-notmuch-before-tree) (advice-add 'notmuch-tree-quit :after #'jao-notmuch-after-tree-quit) @@ -491,13 +507,10 @@ ("D" . jao-notmuch-tree-toggle-delete-thread) ("h" . jao-notmuch-goto-message-buffer) ("i" . jao-notmuch-toggle-images) - ("K" . jao-notmuch-tag-jump-and-next) ("k" . jao-notmuch-tree-read-thread) - ("n" . jao-notmuch-tree-next) ("N" . jao-notmuch-tree--forward) ("O" . notmuch-tree-toggle-order) ("o" . jao-notmuch-tree-widen-search) - ("p" . jao-notmuch-tree-previous) ("P" . jao-notmuch-tree--backward) ("r" . notmuch-tree-reply) ("R" . notmuch-tree-reply-sender) |