From 2ed606540fd3a4302aae86a838f61650a7e2725e Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 3 Nov 2021 03:40:43 +0000 Subject: notmuch tweaks (tags toggling) --- notmuch.org | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'notmuch.org') diff --git a/notmuch.org b/notmuch.org index 5d89ca5..8683045 100644 --- a/notmuch.org +++ b/notmuch.org @@ -11,14 +11,18 @@ (:name "b" :query "tag:new and tag:bigml and tag:bugs" :face jao-themes-error) (:name "S" :query "tag:new and tag:bigml and tag:support" :face default) - (:name "W" :query "tag:new and tag:bigml" :face default) + (:name "W" + :query "tag:new and tag:bigml and not tag:\"/support|bugs|inbox/\"" + :face default) (:name "H" :query "tag:new and tag:jao and tag:hacking") (:name "T" :query "tag:new and tag:think") (:name "E" :query "tag:new and tag:\"/emacs/\"") (:name "l" :query "tag:new and tag:local") - (:name "J" :query "tag:new and tag:jao and not tag:\"/local|hacking/\"" + (:name "J" + :query "tag:new and tag:jao and not tag:\"/local|hacking|draft/\"" :face default) - (:name "F" :query "tag:new and tag:feeds and not tag:\"/emacs|papers/\"") + (:name "F" :query + "tag:new and tag:feeds and not tag:\"/emacs|papers|think/\"") (:name "G" :query "tag:new and tag:gmane and not tag:\"/emacs|papers/\"") (:name "P" :query "tag:new and tag:papers"))) @@ -62,10 +66,14 @@ (defun jao-notmuch--sec (q) (append q '(:secondary t))) - (defun jao-notmuch--sq (tag k &optional d0 d1) + (defun jao-notmuch--sq (tag &optional k d0 d1) (jao-notmuch--sec (jao-notmuch--qn (or d0 "feeds") (or d1 tag) k (list (concat "tag:" tag))))) + (defvar jao-notmuch--feeds + '("clojure" "elixir" "erlang" "gnus" "haskell" "idris" + "lobsters" "mailutils" "notmuch" "papers" "scheme" "xmobar")) + (setq notmuch-saved-searches `(,(jao-notmuch--q "bigml" "inbox" "bi") ,(jao-notmuch--q "bigml" "support" "bs") @@ -78,22 +86,11 @@ ,(jao-notmuch--sq "emacs-devel" "ed" "emacs" "devel") ,(jao-notmuch--sq "emacs-bugs" "eb" "emacs" "bugs") ,(jao-notmuch--sq "emacs-diffs" "ec" "emacs" "diffs") - ,(jao-notmuch--sq "clojure" "fc") - ,(jao-notmuch--sq "elixir" "fex") - ,(jao-notmuch--sq "erlang" "fe") - ,(jao-notmuch--sq "gnus" "fg") - ,(jao-notmuch--sq "haskell" "fh") - ,(jao-notmuch--sq "idris" "fid") - ,(jao-notmuch--sq "lobsters" "fl") - ,(jao-notmuch--sq "mailutils" "fm") - ,(jao-notmuch--sq "notmuch" "fn") - ,(jao-notmuch--sq "papers" "fax") - ,(jao-notmuch--sq "scheme" "fl") - ,(jao-notmuch--sq "xmobar" "fx") + ,@(mapcar #'jao-notmuch--sq jao-notmuch--feeds) ,(jao-notmuch--sec (jao-notmuch--qn "feeds" "prog" "fp" '("tag:prog" - "not tag:\"/(lobsters|clojure|xmobar|gmane)/\""))) + "not tag:\"/(lobsters|clojure|erlang|xmobar|gmane)/\""))) ,@(mapcar #'jao-notmuch--sec (jao-notmuch--mboxes-search "feeds" "emacs" "prog")))) @@ -105,7 +102,8 @@ "not tag:\"/(feeds|spam|local)/\"")) ,(jao-notmuch--q "bml" "flagged" "rb" '("tag:flagged" "tag:bigml")) ,(jao-notmuch--q "jao" "flagged" "rj" '("tag:flagged" "not tag:bigml")) - ,(jao-notmuch--q "unread" nil "n" '("tag:unread")))) + ,(jao-notmuch--q "new" nil "nn" '("tag:new")) + ,(jao-notmuch--q "unread" nil "nu" '("tag:unread")))) (defun jao-notmuch-tree-widen-search () (interactive) @@ -402,8 +400,8 @@ :bind (:map notmuch-tree-mode-map (("b" . jao-notmuch-browse-urls) ("C" . jao-notmuch-echo-count) - ("d" . jao-notmuch-tree-delete-message) - ("D" . jao-notmuch-tree-delete-thread) + ("d" . jao-notmuch-tree-toggle-delete) + ("D" . jao-notmuch-tree-toggle-delete-thread) ("h" . jao-notmuch-goto-message-buffer) ("H" . jao-notmuch-click-message-buffer) ("i" . jao-notmuch-show-images) @@ -417,14 +415,14 @@ ("P" . jao-notmuch-tree--backward) ("r" . notmuch-tree-reply) ("R" . notmuch-tree-reply-sender) - ("s" . jao-notmuch-tree-spam) - ("u" . jao-notmuch-tree-flag) + ("s" . jao-notmuch-tree-toggle-spam) + ("u" . jao-notmuch-tree-toggle-flag) ("v" . notmuch-tree-scroll-message-window) ("V" . notmuch-tree-scroll-message-window-back) ("x" . jao-notmuch-arXiv-capture) ("<" . jao-notmuch-tree-beginning-of-buffer) (">" . jao-notmuch-tree-end-of-buffer) - ("/" . notmuch-tree-view-raw-message) + ("\\" . notmuch-tree-view-raw-message) ("." . jao-notmuch-toggle-mime-parts) ("=" . jao-notmuch-tree-toggle-message) ("RET" . jao-notmuch-tree-show-or-scroll) -- cgit v1.2.3