-#+begin_src emacs-lisp :tangle no
-(defun amin/notmuch ()
- "Delete other windows, then launch `notmuch'."
- (interactive
- (when (equal current-prefix-arg nil)
- (delete-other-windows)))
- (notmuch))
-
-(use-package notmuch
- :commands notmuch
- :bind ("C-c n" . amin/notmuch)
- :custom (notmuch-always-prompt-for-sender t)
- :config
- (setq notmuch-hello-sections
- '(notmuch-hello-insert-header
- notmuch-hello-insert-saved-searches
- ;; notmuch-hello-insert-search
- notmuch-hello-insert-alltags)
- notmuch-search-oldest-first nil
- notmuch-show-all-tags-list t
- notmuch-message-headers ; see bug follow-up above
- '("Subject" "To" "Cc" "Date" "List-Id" "X-RT-Originator")
- notmuch-hello-thousands-separator ","
- notmuch-fcc-dirs
- '(("amin@aminb.org" . "amin/Sent")
- ("bandali@gnu.org" . "gnu/Sent")
- ("abandali@uwaterloo.ca" . "\"uwaterloo/Sent Items\"")
- ("mab@gnu.org" . "gnu/Sent")
- ("amin@gnu.org" . "gnu/Sent")
- ("aminb@gnu.org" . "gnu/Sent")
- (".*" . "sent"))
- notmuch-search-result-format
- '(("date" . "%12s ")
- ("count" . "%-7s ")
- ("authors" . "%-40s ")
- ("subject" . "%s ")
- ("tags" . "(%s)"))
- notmuch-saved-searches
- '((:name "inbox" :query "tag:inbox" :key "i")
- (:name "unread" :query "tag:unread" :key "u")
- (:name "latest" :query "tag:latest" :key "l")
- (:name "encrypted" :query "tag:encrypted" :key "e")
- (:name "flagged" :query "tag:flagged" :key "f")
- (:name "sent" :query "tag:sent" :key "s")
- (:name "drafts" :query "tag:draft" :key "d")
- (:name "all mail" :query "*" :key "a")))
- ;; (add-hook 'visual-fill-column-mode-hook
- ;; (lambda ()
- ;; (when (string= major-mode 'notmuch-message-mode)
- ;; (setq visual-fill-column-width 70))))
- ;; (set! :evil-state 'notmuch-message-mode 'insert)
- ;; (advice-add #'notmuch-bury-or-kill-this-buffer
- ;; :override #'kill-this-buffer)
- :hook (notmuch-message-mode . doom-modeline-set-special-modeline)