From: Paul Franklin <paul@cs.washington.edu>
Subject: Re: (make-regexp...) in an alist
Date: 03 Oct 1997 17:12:19 -0700 [thread overview]
Message-ID: <r9qzpoq8jz0.fsf@fester.cs.washington.edu> (raw)
In-Reply-To: Norman Walsh's message of Fri, 3 Oct 1997 17:15:54 -0400
>>>>> Norman Walsh writes:
> (setq nnmail-split-methods
> '(("letterpress" "Sender:.*letpress@")
> ("spam" (make-regexp '("From:.*@savetrees.com"
> "From:.*@ispam.net"
> "Subject:.*are you being investigated")))
> ("dssslist" "To:.*dssslist")))
I've attached a complicated example which doesn't use backquotes.
Basically, the idea is to use "(list" to get yourself one level down
(or cons/concat/make-regexp), or "'(" to avoid interpretation of
everything below it.
(Yes, my split methods are way out of hand.)
--Paul
(setq pdf-nnmail-split-methods
(let ((not-paul "\\([^p]aul\\|[^a]ul\\|[^u]l\\|[^l]\\)")
(not-paul-pdf
"\\([^p]aul\\|[^a]ul\\|[^u]l\\|[^p]df\\|[^d]f\\|[^lf]\\)"))
(list
'((gnus-warning)
("-mail.duplicates" . "\\<duplicate\\>"))
'((x-from-line)
("-demons.mail" . "\\<postmaster\\>"))
'((a)
("-demons.mail" . "\\<MAILER.?DA?EMON\\>")
("-demons.listproc" . "\\<listproc\\>")
("-demons.majordomo.uw.cs" . "\\<Majordomo@cs.washington.edu\\>")
("-demons.majordomo" . "\\<Majordomo\\>"))
(list '(a)
(list "-mail.ads"
"[^a-z0-9][0-9][0-9][0-9][0-9]+@" ; mbox is 4+ digits
"abuse@" ; typically my complaints
(concat
"@[-.a-zA-Z9-0]*\\." ;subdomains + "."
; top-level domain errors:
"\\([a-zA-Z]*[-0-9][-a-zA-Z9-0]*" ; inval char
"\\|[a-zA-Z]\\|" ; too short (single char)
"[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]+\\)" ; too long (4+)
"[^-.a-zA-Z9-0]"))) ; notice end of addr
;; lots more simpler stuff here
'((l)
("-uw.cac"
"@.*\\<cac.washington.edu\\>"
"postmaster@u.washington.edu"))
(list '(l)
(cons "-transmeta.misc"
(concat not-paul "@.*\\<transmeta.com\\>")))
'((l received message-id references in-reply-to)
("-mail.uw.cs.iws"
"\\<grizzly\\>" "\\<lynx\\>" "\\<wolf\\>"))
(list '(l)
(cons "-mail.uw.cs"
(concat not-paul "@.*\\<cs.washington.edu\\>")))
(list '(l)
(cons "-mail.uw.misc"
(concat not-paul-pdf "@.*\\<washington.edu\\>")))
(list '(l)
(cons "-mail.misc"
(concat not-paul-pdf "@.*\\.")))
'(nil ("-mail.uw.cs" . "")))))
next prev parent reply other threads:[~1997-10-04 0:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-03 21:15 Norman Walsh
1997-10-03 22:05 ` William M. Perry
1997-10-04 19:10 ` Hrvoje Niksic
1997-10-04 0:12 ` Paul Franklin [this message]
1997-10-04 1:55 ` Stefan Waldherr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=r9qzpoq8jz0.fsf@fester.cs.washington.edu \
--to=paul@cs.washington.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).