[emacs/notmuch] [re-]add a couple of bindings
authorAmin Bandali <amin@gnu.org>
Thu, 23 Aug 2018 22:32:31 +0000 (18:32 -0400)
committerAmin Bandali <amin@gnu.org>
Thu, 23 Aug 2018 22:32:31 +0000 (18:32 -0400)
init.org

index 25807b7..87b9f02 100644 (file)
--- a/init.org
+++ b/init.org
@@ -883,6 +883,7 @@ TODO: break this giant source block down into individual org sections.
 ** [[https://leanprover.github.io][Lean]] (with [[https://github.com/leanprover/lean-mode][lean-mode]])
 
 #+begin_src emacs-lisp
 ** [[https://leanprover.github.io][Lean]] (with [[https://github.com/leanprover/lean-mode][lean-mode]])
 
 #+begin_src emacs-lisp
+(eval-when-compile (defvar lean-mode-map))
 (use-package lean-mode
   :bind (:map lean-mode-map
               ("S-SPC" . company-complete)))
 (use-package lean-mode
   :bind (:map lean-mode-map
               ("S-SPC" . company-complete)))
@@ -1248,13 +1249,26 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]].
   ;; (set! :evil-state 'notmuch-message-mode 'insert)
   ;; (advice-add #'notmuch-bury-or-kill-this-buffer
   ;;             :override #'kill-this-buffer)
   ;; (set! :evil-state 'notmuch-message-mode 'insert)
   ;; (advice-add #'notmuch-bury-or-kill-this-buffer
   ;;             :override #'kill-this-buffer)
-  ;; (evil-collection-define-key 'normal 'notmuch-common-keymap
-  ;;   "c" (lambda ()
-  ;;         "Compose new mail and prompt for sender"
-  ;;         (interactive)
-  ;;         (let ((current-prefix-arg t))
-  ;;           (call-interactively #'notmuch-mua-new-mail))))
   :bind
   :bind
+  (:map notmuch-common-keymap
+        ("g" . notmuch-poll-and-refresh-this-buffer))
+  (:map notmuch-hello-mode-map
+        ("u" . (lambda ()
+                 "Search for `unread'-tagged messages"
+                 (interactive)
+                 (notmuch-hello-search "tag:unread")))
+        ("i" . (lambda ()
+                 "Search for `inbox'-tagged messages"
+                 (interactive)
+                 (notmuch-hello-search "tag:inbox")))
+        ("l" . (lambda ()
+                 "Search for `latest'-tagged messages"
+                 (interactive)
+                 (notmuch-hello-search "tag:latest")))
+        ("e" . (lambda ()
+                 "Search for `encrypted'-tagged messages"
+                 (interactive)
+                 (notmuch-hello-search "tag:encrypted"))))
   (:map notmuch-search-mode-map
         ("k" . (lambda ()
                  "Mark message read"
   (:map notmuch-search-mode-map
         ("k" . (lambda ()
                  "Mark message read"
@@ -1271,19 +1285,34 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]].
                  "Mark message deleted"
                  (interactive)
                  (notmuch-search-tag '("-unread" "-inbox" "+deleted"))
                  "Mark message deleted"
                  (interactive)
                  (notmuch-search-tag '("-unread" "-inbox" "+deleted"))
-                 (notmuch-search-archive-thread)))
+                 (notmuch-search-next-thread)))
         ("S" . (lambda ()
                  "Mark message as spam"
                  (interactive)
                  (notmuch-search-tag '("-unread" "-inbox" "-webmasters" "+spam"))
         ("S" . (lambda ()
                  "Mark message as spam"
                  (interactive)
                  (notmuch-search-tag '("-unread" "-inbox" "-webmasters" "+spam"))
-                 (notmuch-search-archive-thread))))
-  (:map notmuch-tree-mode-map  ; TODO: additional bindings
+                 (notmuch-search-next-thread))))
+  (:map notmuch-tree-mode-map
+        ("k" . (lambda ()
+                 "Mark message read"
+                 (interactive)
+                 (notmuch-tree-tag '("-unread"))
+                 ;; (notmuch-tree-archive-thread)
+                 (notmuch-tree-next-message)))
+        ("u" . (lambda ()
+                 "Mark message unread"
+                 (interactive)
+                 (notmuch-tree-tag '("+unread"))
+                 (notmuch-tree-next-message)))
+        ("K" . (lambda ()
+                 "Mark message deleted"
+                 (interactive)
+                 (notmuch-tree-tag '("-unread" "-inbox" "+deleted"))
+                 (notmuch-tree-next-message)))
         ("S" . (lambda ()
                  "Mark message as spam"
                  (interactive)
                  (notmuch-tree-tag '("-unread" "-inbox" "-webmasters" "+spam"))
         ("S" . (lambda ()
                  "Mark message as spam"
                  (interactive)
                  (notmuch-tree-tag '("-unread" "-inbox" "-webmasters" "+spam"))
-                 (notmuch-tree-archive-thread))))
-)
+                 (notmuch-tree-next-message)))))
 
 (use-package counsel-notmuch
   :bind ("C-c s m" . counsel-notmuch))
 
 (use-package counsel-notmuch
   :bind ("C-c s m" . counsel-notmuch))