From f0564908f430b33bab7dd9f84a491887b6dd08ed Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 13 Aug 2019 15:42:47 -0400 Subject: [PATCH] Add config for gnus-alias in notmuch --- .emacs.d/init.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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)))