     "r" (notmuch-tree-close-message-pane-and 'notmuch-show-reply-sender)
     "R" (notmuch-tree-close-message-pane-and 'notmuch-show-reply)
     "d" 'evil-collection-notmuch-tree-toggle-delete
-
+    "!" 'evil-collection-notmuch-tree-toggle-unread
+    "=" 'evil-collection-notmuch-tree-toggle-flagged
     "K" 'notmuch-tag-jump
     (kbd "RET") 'notmuch-tree-show-message
     [mouse-1] 'notmuch-tree-show-message

                                         notmuch-search-mode-map
                                         notmuch-search-stash-map))

(defun evil-collection-notmuch-show-toggle-delete ()
  "Toggle deleted tag for message."
  (interactive)
  (if (member "deleted" (notmuch-show-get-tags))
      (notmuch-show-tag (list "-deleted"))
    (notmuch-show-tag (list "+deleted")))
  (evil-next-line))

(defun evil-collection-notmuch-search-toggle-delete ()
  "Toggle deleted tag for message."
  (interactive)
  (if (member "deleted" (notmuch-search-get-tags))
      (notmuch-search-tag (list "-deleted"))
    (notmuch-search-tag (list "+deleted")))
  (evil-next-line))

(defun evil-collection-notmuch-tree-toggle-delete ()
  "Toggle deleted tag for message."
  (interactive)
  (if (member "deleted" (notmuch-search-get-tags))
      (notmuch-tree-tag (list "-deleted"))
    (notmuch-tree-tag (list "+deleted")))
  (evil-next-line))

(defun evil-collection-notmuch-hello-ret ()
  (interactive)

      "a" 'notmuch-search-archive-thread
      "c" 'compose-mail
      "d" 'evil-collection-notmuch-search-toggle-delete
      "!" 'evil-collection-notmuch-search-toggle-unread
      "=" 'evil-collection-notmuch-search-toggle-flagged
      "q" 'notmuch-bury-or-kill-this-buffer
      "r" 'notmuch-search-reply-to-thread-sender
      "t" 'notmuch-search-filter-by-tag
