about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-16T17·13+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-02-16T17·13+0000
commit08c3f6dd693c327514d4cd819436a7bcb302f9f3 (patch)
tree462074c185a4834df1f0aa06836fca3474990ac7 /emacs/.emacs.d/wpc
parent1ed7f2ed734ad7fc08aff99b743bfeb5b19dbe8b (diff)
Support KBDs for labelling emails
I can already tag emails with `+` and `-`. Here I'm defining KBDs for moving
messages from my inbox into: action, review, and waiting. I'm also mutually
excluding messages in action, review, and waiting from inbox and vice versa.

I'm also supporting a "muted" tag for now; I'm still learning how to use notmuch
with email threads, but I'm hoping the "muted" tag will prevent future messages
in a thread from arriving in my inbox.
Diffstat (limited to 'emacs/.emacs.d/wpc')
-rw-r--r--emacs/.emacs.d/wpc/keybindings.el17
1 files changed, 16 insertions, 1 deletions
diff --git a/emacs/.emacs.d/wpc/keybindings.el b/emacs/.emacs.d/wpc/keybindings.el
index f756e48dbe99..116c1e638b96 100644
--- a/emacs/.emacs.d/wpc/keybindings.el
+++ b/emacs/.emacs.d/wpc/keybindings.el
@@ -120,8 +120,23 @@
 
 ;; For now, I'm mimmicking Gmail KBDs that I have memorized and enjoy
 (general-define-key
- :states '(normal)
+ :states '(normal visual)
  :keymaps '(notmuch-search-mode-map)
+ "M"  (lambda ()
+        (interactive)
+        (notmuch-search-tag '("-inbox" "+muted")))
+ "mi" (lambda ()
+        (interactive)
+        (notmuch-search-tag '("+inbox" "-action" "-review" "-waiting" "-muted")))
+ "ma" (lambda ()
+        (interactive)
+        (notmuch-search-tag '("-inbox" "+action" "-review" "-waiting")))
+ "mr" (lambda ()
+        (interactive)
+        (notmuch-search-tag '("-inbox" "-action" "+review" "-waiting")))
+ "mw" (lambda ()
+        (interactive)
+        (notmuch-search-tag '("-inbox" "-action" "-review" "+waiting")))
  "e" #'notmuch-search-archive-thread)
 
 (general-define-key