diff --git a/.emacs.d/init.el b/.emacs.d/init.el index f4faa88..57daa65 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -790,6 +790,30 @@ ("k" . previous-line) ("N" . nm-sticky-tag-and-next)) :config + (use-package gnus-alias :ensure + :hook (message-mode . gnus-alias-init) + :config + (defun ga-id (alias &rest args) + (list alias + (plist-get args :refers-to) + (plist-get args :from) + (plist-get args :organization) + (plist-get args :extra-headers) + (plist-get args :body) + (plist-get args :signature))) + (setq + gnus-alias-identity-alist + (list + (ga-id "main" :from "Adam Goldsmith ") + (ga-id "tsrc" :from "Adam Goldsmith ") + (ga-id "wpi" :from "Adam Goldsmith ") + (ga-id "gmail" :from "Adam Goldsmith "))) + (setq + gnus-alias-identity-rules + '(("tsrc" ("any" "tsrc\\@mailman\\.qth\\.net" both) "tsrc") + ("WPI" ("any" ".*\\@wpi\\.edu" both) "wpi"))) + (setq gnus-alias-default-identity "main")) + (defun nm-tag-and-next (tags) "Apply some changes to a message, then move to the next line" (nm-apply-to-result (lambda (q) (notmuch-tag q tags)))