aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenny Ballou <kb@devnulllabs.io>2023-09-12 09:16:26 -0600
committerKenny Ballou <kb@devnulllabs.io>2023-09-12 09:17:47 -0600
commit5b33cda0319ff1ee113d08d5626f2b67800a3ef4 (patch)
tree4b9e285dfaf5e1e62745c3827aac3315098ea8dc
parent0217aba4e4b113c42d993e305df45c55d3b477a4 (diff)
downloaddotfiles-5b33cda0319ff1ee113d08d5626f2b67800a3ef4.tar.gz
dotfiles-5b33cda0319ff1ee113d08d5626f2b67800a3ef4.tar.xz
config: emacs: mail: use maildir as context fallback
Signed-off-by: Kenny Ballou <kb@devnulllabs.io>
-rw-r--r--config/emacs/emacs.d/emacs.org18
1 files changed, 12 insertions, 6 deletions
diff --git a/config/emacs/emacs.d/emacs.org b/config/emacs/emacs.d/emacs.org
index 1df06e05..155b7737 100644
--- a/config/emacs/emacs.d/emacs.org
+++ b/config/emacs/emacs.d/emacs.org
@@ -5078,10 +5078,11 @@ Configuration taken from the tutorial found here:
(defun kb/msg-to-devnulllabs-p (msg)
"Is MSG addressed to personal."
(when msg
- (mu4e-message-contact-field-matches
- msg '(:from :to :cc :bcc) (list (rx (seq (* nonl) "@devnulllabs.io"))
- (rx (seq "kennyballou" (* nonl) "@duck.com"))
- (rx (seq "kennethmgballou" (* nonl) "@gmail.com"))))))
+ (or (mu4e-message-contact-field-matches
+ msg '(:from :to :cc :bcc) (list (rx (seq (* nonl) "@devnulllabs.io"))
+ (rx (seq "kennyballou" (* nonl) "@duck.com"))
+ (rx (seq "kennethmgballou" (* nonl) "@gmail.com"))))
+ (string-match-p "^/devnulllabs.io" (mu4e-message-field msg :maildir)))))
(defun kb/devnulllabs-maildir ()
"Return base maildir for devnulllabs."
@@ -5090,8 +5091,13 @@ Configuration taken from the tutorial found here:
(defun kb/msg-to-boisestate-p (msg)
"Is MSG addressed to BSU account."
(when msg
- (mu4e-message-contact-field-matches
- msg '(:from :to :cc :bcc) (rx (seq "kennyballou" (* nonl) "@" (32 (submatch "u.")) "boisestate.edu")))))
+ (or (mu4e-message-contact-field-matches
+ msg '(:from :to :cc :bcc) (rx (seq "kennyballou"
+ (* nonl)
+ "@"
+ (32 (submatch "u."))
+ "boisestate.edu")))
+ (string-match-p "^/u.boisestate.edu" (mu4e-message-field msg :maildir)))))
(defun kb/boisestate-maildir ()
"Return base maildir for uboisestate."