From: Nevin Kapur <nevin@jhu.edu>
Subject: Re: [PATCH] Expiry based on headers (Take 2)
Date: Sat, 08 Dec 2001 18:53:23 -0500 [thread overview]
Message-ID: <m3zo4ti80c.fsf@bombay.dyndns.org> (raw)
In-Reply-To: <ilur8q5xskb.fsf@dhcp128.extundo.com> (Simon Josefsson's message of "Sat, 08 Dec 2001 23:20:20 +0100")
Simon Josefsson <jas@extundo.com> writes:
> +(defun nnmail-fancy-expiry-target (group)
> + "Returns a target expiry group determined by `nnmail-fancy-expiry-targets'."
> + (let* (header
> + (case-fold-search nil)
> + (from (or (message-fetch-field "from") ""))
> + (to (or (message-fetch-field "to") ""))
> + (date (date-to-time
> + (or (message-fetch-field "date") (current-time-string))))
> + (target 'delete))
> + (dolist (regexp-target-pair (reverse nnmail-fancy-expiry-targets) target)
> + (setq header (car regexp-target-pair))
> + (cond
> + ;; If the header is to-from then match against the
> + ;; To or From header
> + ((and (equal header 'to-from)
> + (or (string-match (cadr regexp-target-pair) from)
> + (and (string-match message-dont-reply-to-names from)
> + (string-match (cadr regexp-target-pair) to))))
> + (setq target (format-time-string (caddr regexp-target-pair) date)))
> + ((and (not (equal header 'to-from))
> + (string-match (cadr regexp-target-pair)
> + (message-fetch-field header)))
> + (setq target (format-time-string (caddr regexp-target-pair)
> + date))))))))
^
I forgot to mention that there is one too many parentheses on this line.
--
Nevin Kapur
nevin@jhu.edu
prev parent reply other threads:[~2001-12-08 23:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-08 16:42 [PATCH] Expiry based on headers Nevin Kapur
2001-12-08 17:11 ` Simon Josefsson
2001-12-08 18:56 ` Nevin Kapur
2001-12-08 21:01 ` [PATCH] Expiry based on headers (Take 2) Nevin Kapur
2001-12-08 22:20 ` Simon Josefsson
2001-12-08 23:35 ` Nevin Kapur
2001-12-09 0:33 ` Simon Josefsson
2001-12-08 23:53 ` Nevin Kapur [this message]
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=m3zo4ti80c.fsf@bombay.dyndns.org \
--to=nevin@jhu.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).