aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules/bard-emacs-email.el
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-12-26 19:40:49 -0500
committerBardofSprites <[email protected]>2025-12-26 19:40:49 -0500
commit21794a4dfa857a770155b9e0c59af885e0d5756c (patch)
tree06db5ca0fc03ce026725ed83eec24b4e5711a382 /bard-emacs-modules/bard-emacs-email.el
parent72a63d40f3278aade59bc9adb55bc374e45499ea (diff)
literate configuration
Diffstat (limited to 'bard-emacs-modules/bard-emacs-email.el')
-rw-r--r--bard-emacs-modules/bard-emacs-email.el99
1 files changed, 52 insertions, 47 deletions
diff --git a/bard-emacs-modules/bard-emacs-email.el b/bard-emacs-modules/bard-emacs-email.el
index 68605a7..797f01b 100644
--- a/bard-emacs-modules/bard-emacs-email.el
+++ b/bard-emacs-modules/bard-emacs-email.el
@@ -1,57 +1,26 @@
(require 'bard-email)
-;; 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
- :after notmuch
- :config
- (setq notmuch-indicator-args
- '(( :terms "tag:unread and tag:inbox"
- :label "[U] "
- :label-face prot-modeline-indicator-green
- :counter-face prot-modeline-indicator-green)
- ( :terms "tag:unread and tag:linux"
- :label "[L] "
- :label-face prot-modeline-indicator-cyan
- :counter-face prot-modeline-indicator-cyan)
- ( :terms "tag:unread and tag:emacs"
- :label "[E] "
- :label-face prot-modeline-indicator-blue
- :counter-face prot-modeline-indicator-blue))
-
- notmuch-indicator-refresh-count (* 60 3)
- notmuch-indicator-hide-empty-counters t
- notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer))
- (setq notmuch-indicator-add-to-mode-line-misc-info nil)
- (notmuch-indicator-mode t))
-
-;; use msmtp
-(setq message-send-mail-function 'message-send-mail-with-sendmail)
-(setq sendmail-program "/usr/bin/msmtp")
-
-(setq notmuch-show-logo t
- 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-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-alltags)
- notmuch-show-all-tags-list t)
+ (define-key global-map (kbd "C-c m") #'notmuch)
+ (setq notmuch-show-logo t
+ 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-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-alltags)
+ notmuch-show-all-tags-list t)
-(setq notmuch-search-oldest-first nil)
-(setq notmuch-show-seen-current-message 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)
+ (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-show-empty-saved-searches t)
(setq notmuch-saved-searches
@@ -107,4 +76,40 @@
notmuch-draft-folder "drafts"
notmuch-draft-save-plaintext 'ask)
+(use-package notmuch-indicator
+ :ensure t
+ :after notmuch
+ :config
+ (setq notmuch-indicator-args
+ '(( :terms "tag:unread and tag:inbox"
+ :label "[U] "
+ :label-face prot-modeline-indicator-green
+ :counter-face prot-modeline-indicator-green)
+ ( :terms "tag:unread and tag:linux"
+ :label "[L] "
+ :label-face prot-modeline-indicator-cyan
+ :counter-face prot-modeline-indicator-cyan)
+ ( :terms "tag:unread and tag:emacs"
+ :label "[E] "
+ :label-face prot-modeline-indicator-blue
+ :counter-face prot-modeline-indicator-blue))
+
+ notmuch-indicator-refresh-count (* 60 3)
+ notmuch-indicator-hide-empty-counters t
+ notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer))
+ (setq notmuch-indicator-add-to-mode-line-misc-info nil)
+ (notmuch-indicator-mode t))
+
+(use-package ol-notmuch
+ :ensure t
+ :after notmuch)
+
+;; use msmtp
+(setq sendmail-program "/usr/bin/msmtp"
+ message-send-mail-function 'message-send-mail-with-sendmail
+ message-sendmail-f-is-evil nil
+ mail-specify-envelope-from t
+ message-sendmail-envelope-from 'header
+ mail-envelope-from t)
+
(provide 'bard-emacs-email)