[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22315: [patch][gnus] allow functions for checking mails
From: |
Rasmus |
Subject: |
bug#22315: [patch][gnus] allow functions for checking mails |
Date: |
Tue, 05 Jan 2016 19:56:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Hi,
I use my mydomain.net for all my private mails. As such my set of mail
accounts is basically ".*@mydomain.net". I reserve a couple of addresses
like foo@mydomain.net for the local foo club's mailing list, though.
Thus, foo@mydomain.net is not one of my emails.
Since Emacs doesn't have regexp look-ahead it's pretty difficult to bend
message-alternative-emails, message-dont-reply-to-names,
gnus-ignored-from-addresses to recognize the above rule.
The attached patches allow the three variables message-alternative-emails,
gnus-ignored-from-addresses and message-dont-reply-to-names to be
predicates. Thus, I can solve my woes with this simple predicate:
(defun rasmus/mailp (email)
(let (case-fold-search)
;; rasmus/my-mails is known.
(and (string-match-p rasmus/my-mails email)
(not (string-match-p rasmus/ml-mails email)))))
Also, I don't know how changelog works for Gnus now (or whenever it moves
to emacs.git). Also, I don’t know if the patch should be against gnus.git
or emacs.git. The attached patches should work with the master branch of
gnus.git.
Thanks,
Rasmus
--
Tack, ni svenska vakttorn. Med plutonium tvingar vi dansken på knä!
0001-Allow-message-alternative-emails-to-be-a-function.patch
Description: Text Data
0002-Allow-gnus-ignored-from-addresses-to-be-a-function.patch
Description: Text Data
0003-Allow-message-dont-reply-to-names-to-be-a-function.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#22315: [patch][gnus] allow functions for checking mails,
Rasmus <=