From: prj@po.cwru.edu (Paul Jarc)
Subject: Re: Generating Mail-Followup-To: headers
Date: Fri, 19 Oct 2001 16:16:12 -0400 [thread overview]
Message-ID: <m3y9m7l719.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <87zo6nftt7.fsf@mclinux.com> (Josh Huber's message of "Fri, 19 Oct 2001 13:01:08 -0400")
Josh Huber <huber@alum.wpi.edu> wrote:
> + ;; Generate the Mail-Followup-To header...
> + ;; only if the header doesn't exist.
> + (when (and (or message-mft-regexps message-mft-address-functions)
> + (not (message-fetch-field "mail-followup-to")))
> + (let ((Mail-Followup-To (message-make-mft)))
> + (message-generate-headers '((optional . Mail-Followup-To)))))
That will use the symbol 'Mail-Followup-To, not its variable value.
We want this:
(message-generate-headers `((optional . ,Mail-Followup-To)))))
Or this:
(message-generate-headers (list (cons 'optional Mail-Followup-To)))))
We should also check that this is a mail message, not news.
> + ;; otherwise, delete the MFT header if the value is "off"
> + (and (string= "off" (message-fetch-field "mail-followup-to"))
> + (message-remove-header "Mail-Followup-To"))
I'd use equal, not string=, or else restructure the logic so that when
we reach this point, we already know that there is an MFT field. It
happens that string= will interpret the value nil as the string "nil",
and so this will still work as-is, but relying on that just scares me.
> +(defun message-make-mft ()
> + "Return the Mail-Followup-To header."
> + (let ((recipients (message-options-get 'message-recipients))
> + (mft-regexps (apply 'append message-mft-regexps
> + (mapcar '(lambda (func) (funcall func))
> + message-mft-address-functions))))
> + (and (eval `(or ,@(mapcar '(lambda (regexp)
> + (and regexp (string-match regexp recipients)))
> + mft-regexps)))
> + recipients)))
Rather than match all regexps against the recipients, and then look
for a non-nil result, we could iterate through the regexp list and
stop as soon as we find a match. It'd also be better to match
each regexp against each recipient address individually, using only
the address itself and not the name part, instead of against the whole
recipient string.
> Who's going to write gnus-subscribed-addresses now? :)
I volunteer to intend to do it until someone actually does it. (Hey,
it worked once.)
paul
next prev parent reply other threads:[~2001-10-19 20:16 UTC|newest]
Thread overview: 147+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-18 5:11 Matt Armstrong
2001-10-18 5:43 ` Paul Jarc
2001-10-18 16:08 ` Matt Armstrong
2001-10-18 16:19 ` Kai Großjohann
2001-10-18 16:41 ` Paul Jarc
2001-10-18 18:17 ` Kai Großjohann
2001-10-18 23:19 ` Maciej Matysiak
2001-10-19 9:03 ` Kai Großjohann
2001-11-01 21:54 ` Maciej Matysiak
2001-11-01 22:10 ` Matt Armstrong
2001-11-02 1:03 ` Samuel Padgett
2001-11-07 13:39 ` Maciej Matysiak
2001-11-07 13:30 ` Maciej Matysiak
2001-11-07 14:26 ` Per Abrahamsen
2001-11-07 14:31 ` Didier Verna
2001-11-07 14:40 ` Per Abrahamsen
2001-11-07 14:44 ` Josh Huber
2001-11-07 15:36 ` Kai Großjohann
2001-11-07 16:08 ` Matt Armstrong
2001-11-07 17:03 ` Kai Großjohann
2001-11-07 19:59 ` Josh Huber
2001-11-02 8:31 ` Kai Großjohann
2001-11-02 16:09 ` Matt Armstrong
2001-11-02 16:52 ` OT: make bbdb shut up about different email addresses? Josh Huber
2001-11-02 17:37 ` Matt Armstrong
2001-11-02 17:48 ` Jason R. Mastaler
2001-11-02 19:44 ` Matt Armstrong
2001-11-02 19:58 ` Paul Jarc
2001-11-02 18:35 ` Matt Armstrong
2001-11-02 22:27 ` Jack Twilley
2001-11-02 23:54 ` Matt Armstrong
2001-11-03 5:16 ` thoughts on spam Bill White
2001-11-03 6:33 ` Jason R. Mastaler
2001-11-03 7:29 ` SPAM? What SPAM? (was: thoughts on spam) Robin S. Socha
2001-11-03 18:13 ` Harry Putnam
2001-11-03 18:39 ` Jason R. Mastaler
2001-11-03 19:04 ` Karl Kleinpaste
2001-11-03 19:12 ` Jason R. Mastaler
2001-11-03 19:21 ` Harry Putnam
2001-11-03 22:52 ` Karl Kleinpaste
2001-11-03 14:48 ` thoughts on spam Bill White
2001-11-03 15:12 ` Stainless Steel Rat
2001-11-03 18:24 ` Jason R. Mastaler
2001-11-04 6:01 ` Stainless Steel Rat
2001-11-04 7:00 ` Jason R. Mastaler
2001-11-04 8:40 ` Stainless Steel Rat
2001-11-05 20:04 ` Jason R. Mastaler
2001-11-05 20:38 ` Stainless Steel Rat
2001-11-05 23:06 ` Jason R. Mastaler
2001-11-06 1:52 ` Stainless Steel Rat
2001-11-06 2:07 ` Stainless Steel Rat
2001-11-06 2:43 ` Paul Jarc
2001-11-06 3:05 ` Harry Putnam
2001-11-06 3:26 ` Stainless Steel Rat
2001-11-05 22:01 ` Chris Shenton
2001-11-05 22:54 ` Matt Armstrong
2001-11-03 18:26 ` Robin S. Socha
2001-11-03 18:42 ` Jason R. Mastaler
2001-11-03 18:56 ` Fabien Penso
2001-11-03 19:24 ` Robin S. Socha
2001-11-04 5:54 ` Stainless Steel Rat
2001-11-04 7:07 ` Jason R. Mastaler
2001-11-04 9:04 ` Stainless Steel Rat
2001-11-04 17:57 ` Matt Armstrong
2001-11-04 20:46 ` Stainless Steel Rat
2001-11-05 3:49 ` Paul Jarc
2001-11-05 4:34 ` Stainless Steel Rat
2001-11-05 5:27 ` Harry Putnam
2001-11-05 15:59 ` Matt Armstrong
2001-11-05 16:57 ` Stainless Steel Rat
2001-11-05 17:45 ` [OT] " Fabien Penso
2001-11-05 19:25 ` Stainless Steel Rat
2001-11-05 19:33 ` Harry Putnam
2001-11-05 19:58 ` Stainless Steel Rat
2001-11-05 20:01 ` Karl Kleinpaste
2001-11-05 20:35 ` Matt Armstrong
2001-11-06 6:51 ` Harry Putnam
2001-11-06 16:55 ` Matt Armstrong
2001-11-06 18:51 ` Harry Putnam
2001-11-06 19:19 ` Lost Mail (was thoughts on spam) Stainless Steel Rat
2001-11-06 20:02 ` thoughts on spam Matt Armstrong
2001-11-06 20:49 ` Harry Putnam
2001-11-06 19:52 ` Steinar Bang
2001-11-04 17:33 ` François Pinard
2001-11-04 17:23 ` François Pinard
2001-11-03 20:32 ` Russ Allbery
2001-11-03 18:15 ` Harry Putnam
2001-11-04 4:08 ` Bill White
2001-11-04 4:04 ` Harry Putnam
2001-11-04 4:07 ` Harry Putnam
2001-11-04 7:11 ` Bill White
2001-11-04 7:10 ` Jason R. Mastaler
2001-11-04 13:47 ` Harry Putnam
2001-11-04 17:45 ` bbdb arcana Bill White
2001-11-07 13:43 ` Generating Mail-Followup-To: headers Maciej Matysiak
2001-10-19 4:48 ` Per Abrahamsen
2001-10-19 13:46 ` Josh Huber
2001-10-19 14:08 ` Per Abrahamsen
2001-10-19 15:49 ` Paul Jarc
2001-10-19 15:29 ` Matt Armstrong
2001-10-19 16:19 ` Paul Jarc
2001-10-19 19:29 ` Matt Armstrong
2001-10-19 19:44 ` Josh Huber
2001-10-19 20:59 ` Kai Großjohann
2001-10-19 15:42 ` Paul Jarc
2001-10-19 16:16 ` Per Abrahamsen
2001-10-19 16:25 ` Paul Jarc
2001-10-19 17:01 ` Josh Huber
2001-10-19 17:04 ` Josh Huber
2001-10-19 19:46 ` Paul Jarc
2001-10-19 19:54 ` Paul Jarc
2001-10-19 20:05 ` Josh Huber
2001-10-19 20:50 ` Matt Armstrong
2001-10-19 21:12 ` Paul Jarc
2001-10-20 6:52 ` Josh Huber
2001-10-20 9:41 ` Per Abrahamsen
2001-10-21 0:58 ` Matt Armstrong
2001-10-19 20:16 ` Paul Jarc [this message]
2001-10-19 21:12 ` Josh Huber
2001-10-19 21:40 ` Paul Jarc
2001-10-20 6:25 ` Josh Huber
2001-10-19 17:51 ` Kai Großjohann
2001-10-19 18:23 ` Josh Huber
2001-10-19 20:31 ` Matt Armstrong
2001-10-19 20:53 ` Josh Huber
2001-10-19 22:28 ` Kai Großjohann
2001-10-19 23:58 ` Matt Armstrong
2001-10-20 10:56 ` Kai Großjohann
2001-10-20 11:19 ` ShengHuo ZHU
2001-10-20 4:47 ` Paul Jarc
2001-10-20 10:57 ` Kai Großjohann
2001-10-20 6:29 ` Josh Huber
2001-10-19 19:26 ` Matt Armstrong
2001-10-19 21:08 ` Kai Großjohann
2001-10-19 21:20 ` Kai Großjohann
2001-10-20 9:51 ` Per Abrahamsen
2001-10-20 10:59 ` Kai Großjohann
2001-10-19 16:31 ` Kai Großjohann
2001-10-18 16:59 ` Paul Jarc
2001-10-18 16:36 ` Josh Huber
2001-10-18 17:11 ` Paul Jarc
2001-10-18 17:56 ` Josh Huber
2001-10-18 18:52 ` Matt Armstrong
2001-10-18 19:11 ` Josh Huber
2001-10-18 19:29 ` Matt Armstrong
2001-10-18 19:27 ` Paul Jarc
2001-10-19 9:05 ` Kai Großjohann
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=m3y9m7l719.fsf@multivac.cwru.edu \
--to=prj@po.cwru.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).