diff options
| author | bard <[email protected]> | 2024-03-23 22:00:32 -0400 |
|---|---|---|
| committer | bard <[email protected]> | 2024-03-23 22:00:32 -0400 |
| commit | 59a6fb5d5c9789f5606dbdf1a77581891407143d (patch) | |
| tree | ba08339f940fd228d8878cc5d8d67356cbe2da1d | |
| parent | 4d6cf7e5a7b640ff0462d787f4b0d08c394db07a (diff) | |
init commit
| -rw-r--r-- | bard-emacs-modules/bard-emacs-email.el | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/bard-emacs-modules/bard-emacs-email.el b/bard-emacs-modules/bard-emacs-email.el new file mode 100644 index 0000000..0a90e5f --- /dev/null +++ b/bard-emacs-modules/bard-emacs-email.el @@ -0,0 +1,47 @@ +;; General `notmuch' ui configuration + +(use-package notmuch + :ensure t + :config + (define-key global-map (kbd "C-c m") #'notmuch)) + +(use-package notmuch-indicator + :ensure t + :config) + +(setq notmuch-show-logo nil + notmuch-column-control 1.0 + notmuch-hello-auto-refresh t + notmuch-hello-recent-searches-max 20 + notmuch-hello-thousands-separator "" + notmuch-hello-sections '(notmuch-hello-insert-saved-searches) + notmuch-show-all-tags-list t) + +(setq notmuch-search-oldest-first nil) +(setq notmuch-show-seen-current-message t) + +(defun bard/notmuch-mua-empty-subject-check () + "Request confirmation before sending a message with empty subject." + (when (and (null (message-field-value "Subject")) + (not (y-or-n-p "Subject is empty, send anyway? "))) + (error "Sending message cancelled: empty subject"))) +(add-hook 'message-send-hook 'bard/notmuch-mua-empty-subject-check) + +(setq notmuch-saved-searches + `(( :name "📥 inbox" + :query "tag:inbox" + :sort-order newest-first + :key ,(kbd "i")) + ( :name "💬 unread (inbox)" + :query "tag:unread and tag:inbox" + :sort-order newest-first + :key ,(kbd "u")))) + + +(setq notmuch-archive-tags '("+archive") + notmuch-message-replied-tags '("+replied") + notmuch-message-forwarded-tags '("+forwarded") + notmuch-show-mark-read-tags '("-unread") + notmuch-draft-tags '("+draft") + notmuch-draft-folder "drafts" + notmuch-draft-save-plaintext 'ask) |
