GNU bug report logs - #22315
[patch][gnus] allow functions for checking mails

Previous Next

Packages: gnus, emacs;

Reported by: Rasmus <rasmus <at> gmx.us>

Date: Tue, 5 Jan 2016 18:58:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rasmus <rasmus <at> gmx.us>
To: bug-gnu-emacs <at> gnu.org
Subject: [patch][gnus] allow functions for checking mails
Date: Tue, 05 Jan 2016 19:56:35 +0100
[Message part 1 (text/plain, inline)]
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 <at> mydomain.net for the local foo club's mailing list, though.
Thus, foo <at> 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 (text/x-diff, attachment)]
[0002-Allow-gnus-ignored-from-addresses-to-be-a-function.patch (text/x-diff, attachment)]
[0003-Allow-message-dont-reply-to-names-to-be-a-function.patch (text/x-diff, attachment)]

This bug report was last modified 8 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.