mu4e config and refile cleanup

This commit is contained in:
Random936 2024-07-14 18:06:42 -07:00
parent 0814b01de8
commit 2647e3fdae

View File

@ -65,6 +65,10 @@ From here, I can continue onto configuring the ~mu4e~ emacs package.
:config :config
(setq mu4e-mu-binary (executable-find "mu")) (setq mu4e-mu-binary (executable-find "mu"))
;; Disable hard line wrapping
(setq mu4e-compose-format-flowed t)
(add-hook 'mu4e-compose-mode-hook (lambda () (use-hard-newlines -1)))
;; Avoids syncing issues. ;; Avoids syncing issues.
(setq mu4e-change-filenames-when-moving t) (setq mu4e-change-filenames-when-moving t)
@ -91,60 +95,69 @@ From here, I can continue onto configuring the ~mu4e~ emacs package.
((member (car (mu4e-string-to-flags "T")) (mu4e-message-field msg :flags)) "/Trash") ((member (car (mu4e-string-to-flags "T")) (mu4e-message-field msg :flags)) "/Trash")
;; UCSC ;; UCSC
((mu4e-message-contact-field-matches msg :bcc "undergrad@ucsc.edu") "/UCSC") ((or (mu4e-message-contact-field-matches msg :bcc "undergrad@ucsc.edu")
((mu4e-message-contact-field-matches msg :from "noreply@YuJa.com") "/UCSC") (mu4e-message-contact-field-matches msg :from '("noreply@YuJa.com"
((mu4e-message-contact-field-matches msg :from "no-reply@piazza.com") "/UCSC") "no-reply@piazza.com"
((mu4e-message-contact-field-matches msg :from "notifications@instructure.com") "/UCSC") "notifications@instructure.com"
((mu4e-message-contact-field-matches msg :from "no-reply@gradescope.com") "/UCSC") "no-reply@gradescope.com"
((mu4e-message-contact-field-matches msg :from "notification@edstem.org") "/UCSC") "notification@edstem.org"
((mu4e-message-contact-field-matches msg :from "noreply@everbridge.net") "/UCSC") "noreply@everbridge.net"
((mu4e-message-contact-field-matches msg :from ".*office.*@ucsc.edu") "/UCSC") ".*office.*@ucsc.edu"
((mu4e-message-contact-field-matches msg :from "madocast@ucsc.edu") "/UCSC") "madocast@ucsc.edu"
((mu4e-message-contact-field-matches msg :from "ucsc_ucues@ucop.edu") "/UCSC") "ucsc_ucues@ucop.edu"
((mu4e-message-contact-field-matches msg :from "ebeshear@ucsc.edu") "/UCSC") "ebeshear@ucsc.edu"))) "/UCSC")
;; Finance ;; Work Related
((mu4e-message-contact-field-matches msg :from "onlinebanking@ealerts.bankofamerica.com") "/Finance") ((mu4e-message-contact-field-matches msg :from '(".*-noreply@linkedin.com")) "/Work")
((mu4e-message-contact-field-matches msg :from "no.reply.alerts@chase.com") "/Finance")
((mu4e-message-contact-field-matches msg :from "noreply@robinhood.com") "/Finance")
((mu4e-message-contact-field-matches msg :from "venmo@venmo.com") "/Finance")
((mu4e-message-contact-field-matches msg :from "donotreply@officeally.com") "/Finance")
((mu4e-message-contact-field-matches msg :from "online.communications@alerts.comcast.net") "/Finance")
((mu4e-message-contact-field-matches msg :from "orders@eat.grubhub.com") "/Finance")
((mu4e-message-contact-field-matches msg :from "noreply@online.wingstop.com") "/Finance")
;; Packages/Shipping ;; Finance
((mu4e-message-contact-field-matches msg :from "return@amazon.com") "/Packages") ((or (s-equals-p "Your receipt from Apple." (mu4e-message-field msg :subject))
((mu4e-message-contact-field-matches msg :from "auto-confirm@amazon.com") "/Packages") (s-equals-p "1010 Pacific - Payment Confirmation" (mu4e-message-field msg :subject))
((mu4e-message-contact-field-matches msg :from "order-update@amazon.com") "/Packages") (mu4e-message-contact-field-matches msg :from '("onlinebanking@ealerts.bankofamerica.com"
((mu4e-message-contact-field-matches msg :from "shipment-tracking@amazon.com") "/Packages") "no.reply.alerts@chase.com"
((mu4e-message-contact-field-matches msg :from "safeway@p.safeway.com") "/Packages") "noreply@robinhood.com"
((mu4e-message-contact-field-matches msg :from "cvs@cvs.narvar.com") "/Packages") "venmo@venmo.com"
((mu4e-message-contact-field-matches msg :from "ebay@ebay.com") "/Packages") "donotreply@officeally.com"
"online.communications@alerts.comcast.net"
"orders@eat.grubhub.com"
"noreply@online.wingstop.com"))) "/Finance")
;; Packages/Shipping
((mu4e-message-contact-field-matches msg :from '("return@amazon.com"
"auto-confirm@amazon.com"
"order-update@amazon.com"
"shipment-tracking@amazon.com"
"safeway@p.safeway.com"
"cvs@cvs.narvar.com"
"ebay@ebay.com"
"pkginfo@ups.com"
"info@techmikeny.com"
"tracking@shipstation.com")) "/Packages")
;; Slug Security Club ;; Slug Security Club
((mu4e-message-contact-field-matches msg :from "jinoh@ucsc.edu") "/Club") ((or (mu4e-message-contact-field-matches msg :from "jinoh@ucsc.edu")
((s-starts-with-p "[SlugSec" (mu4e-message-field msg :subject)) "/Club") (s-starts-with-p "[SlugSec" (mu4e-message-field msg :subject))) "/Club")
(t "/Archive"))))
;; Config mu4e bookmarks (t "/Archive"))))
(setq mu4e-bookmarks
'((:name "Filtered unread messages" :query "flag:unread AND (maildir:/Archive OR maildir:/Inbox) AND NOT flag:trashed" :key ?u)
(:name "All unread messages" :query "flag:unread" :key ?U)
(:name "Today's messages" :query "date:today..now" :key ?t)
(:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?w)
(:name "Flagged messages" :query "flag:flagged" :key ?f)))
(setq mu4e-maildir-shortcuts ;; Config mu4e bookmarks
'((:maildir "/Inbox" :key ?i) (setq mu4e-bookmarks
(:maildir "/Archive" :key ?a) '((:name "Filtered unread messages" :query "flag:unread AND (maildir:/Archive OR maildir:/Inbox) AND NOT flag:trashed" :key ?u)
(:maildir "/Drafts" :key ?d) (:name "All unread messages" :query "flag:unread" :key ?U)
(:maildir "/Sent" :key ?s) (:name "Today's messages" :query "date:today..now" :key ?t)
(:maildir "/Trash" :key ?t) (:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?w)
(:maildir "/Finance" :key ?f) (:name "Flagged messages" :query "flag:flagged" :key ?f)))
(:maildir "/Packages" :key ?p)
(:maildir "/Club" :key ?c) (setq mu4e-maildir-shortcuts
(:maildir "/UCSC" :key ?u)))) '((:maildir "/Inbox" :key ?i)
(:maildir "/Archive" :key ?a)
(:maildir "/Drafts" :key ?d)
(:maildir "/Sent" :key ?s)
(:maildir "/Trash" :key ?t)
(:maildir "/Finance" :key ?f)
(:maildir "/Packages" :key ?p)
(:maildir "/Work" :key ?w)
(:maildir "/Club" :key ?c)
(:maildir "/UCSC" :key ?u))))
#+end_src #+end_src
Adding some configuration to correct ~mu4e~'s default values. Adding some configuration to correct ~mu4e~'s default values.