unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* cleaning up a big regexp
@ 2014-09-15 11:15 Tory S. Anderson
  2014-09-15 11:25 ` Eric Abrahamsen
  2014-09-15 14:35 ` Thorsten Jolitz
  0 siblings, 2 replies; 15+ messages in thread
From: Tory S. Anderson @ 2014-09-15 11:15 UTC (permalink / raw)
  To: emacs list

Using gnus I have a growing regexp that represents the criteria for bulk email and splits accordingly:

(setq my-gnus-bulk-regexp "\\(^From:.*\\(@maillist.codeproject.com\\|@papajohns-specials.com\\|@qomail.quikorder.com\\|@linkedin.com\\|@facebookmail.com\\|@plus.google.com\\|@twitter.com\\|@youtube.com\\|@linguistlist.org\\|sportsauthority.com\\)\\)\\|\\(^To:.*torysanderson@gmail.com\\)")

;; TODO make bulk-list
(setq nnmail-split-methods
       '(("mail.bulk" my-gnus-bulk-regexp)
        ...
 

Is there a way to clean this up to make it both more readable and more easily editable? It seems like keeping some kind of list would be the way to do it, instead of an ever-lengthening string. 



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-09-17 21:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.8887.1410779723.1147.help-gnu-emacs@gnu.org>
2014-09-15 11:18 ` cleaning up a big regexp Joost Kremers
2014-09-15 11:26   ` Tory S. Anderson
2014-09-15 11:41   ` Michael Albinus
2014-09-15 12:06     ` Tory S. Anderson
2014-09-15 12:18       ` Michael Albinus
2014-09-15 12:36       ` Stefan Monnier
2014-09-15 14:11         ` Michael Albinus
2014-09-15 14:42           ` Thanks! " Tory S. Anderson
2014-09-15 19:00           ` Stefan Monnier
2014-09-16 11:05             ` Regexp in nnmail-split-methods (was Re: cleaning up a big regexp) Tory S. Anderson
     [not found]             ` <mailman.8968.1410865533.1147.help-gnu-emacs@gnu.org>
2014-09-16 12:33               ` sokobania.01
2014-09-17 21:20                 ` RESOLVED " Tory S. Anderson
2014-09-15 11:15 cleaning up a big regexp Tory S. Anderson
2014-09-15 11:25 ` Eric Abrahamsen
2014-09-15 14:35 ` Thorsten Jolitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).