summary refs log tree commit diff
path: root/emacs/custom/my-notmuch.el
blob: 69fadd99161829d652e7301bd4521af38bc83d63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;;; my-notmuch.el --- Configures notmuch -*- lexical-binding: t -*-

;;; Commentary:

;;; Code:

(require 'notmuch)

(setq notmuch-show-logo nil)
(setq notmuch-always-prompt-for-sender t)
(setq notmuch-show-relative-dates t)
(setq notmuch-archive-tags '("-inbox" "-unread"))

;; configurations related to search
(setq notmuch-search-oldest-first nil
      ;; a few saved search - I can jump to them by hitting 'j'
      notmuch-saved-searches '((:name "unread":query "tag:unread AND date:this_year.." :key "u")
                               (:name "inbox unread" :query "tag:inbox AND tag:unread" :key "U")
                               (:name "today" :query "date:today" :key "t")
                               (:name "this week" :query "date:this_week.." :key "w")
                               (:name "inbox" :query "tag:inbox" :key "i")
                               (:name "focused inbox" :query "tag:inbox AND tag:unread AND date:this_week.." :key "f")
                               (:name "sent" :query "tag:sent" :key "s")
                               (:name "all emails" :query "*" :key "a"))
      ;; make it short and sweet
      notmuch-search-result-format '(("date" . "%12s ")
                                     ("authors" . "%-20s ")
                                     ("tags" . "(%s) ")
                                     ("subject" . "%s")))

(add-hook 'notmuch-message-mode-hook 'flyspell-mode)

(provide 'my-notmuch)

;;; my-notmuch.el ends here