Commit e7443cc99019

Vincent Demeester <vincent@sbr.pm>
2026-01-18 23:35:12
feat(emacs): improve mu4e refile with context-aware email handling
- Move Red Hat work emails to Trash instead of archiving - Ensure Gmail sync removes emails permanently after 30 days - Add explanatory comments for each refile condition Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 0d9ea38
Changed files (1)
dots
.config
emacs
old
dots/.config/emacs/old/config/config-mu4e.el
@@ -47,9 +47,13 @@
   (defun vde-mu4e--refile (msg)
     "Refile function to smartly move `MSG' to a given folder."
     (cond
-     ;; FIXME
+     ;; Delete GitHub CI activity notifications
      ((string= (plist-get (car-safe (mu4e-message-field msg :cc)) :email) "ci_activity@noreply.github.com")
       "/icloud/Deleted Messages")
+     ;; Move Red Hat emails to Trash (will be permanently deleted by Gmail after 30 days)
+     ((string-prefix-p "/redhat" (mu4e-message-field msg :maildir))
+      "/redhat/[Gmail]/Trash")
+     ;; Archive iCloud and other emails by year
      (t
       (let ((year (format-time-string "%Y" (mu4e-message-field msg :date))))
 	(format "/icloud/Archives/%s" year)))))