From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39500 Path: main.gmane.org!not-for-mail From: Josh Huber Newsgroups: gmane.emacs.gnus.general Subject: Re: Generating Mail-Followup-To: headers Date: Fri, 19 Oct 2001 17:12:04 -0400 Organization: Mind your own business, you silly arthur king! Sender: owner-ding@hpc.uh.edu Message-ID: <87669bfi6z.fsf@mclinux.com> References: <87y9m9fs6b.fsf@squeaker.lickey.com> <87elo1exsd.fsf@squeaker.lickey.com> <87u1wvkaiv.fsf@mclinux.com> <87zo6nftt7.fsf@mclinux.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175200 28315 80.91.224.250 (21 Oct 2002 04:40:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:00 +0000 (UTC) Return-Path: Original-Received: (qmail 13033 invoked from network); 19 Oct 2001 21:12:26 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 19 Oct 2001 21:12:26 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15ugvq-0003U2-00; Fri, 19 Oct 2001 16:11:54 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 19 Oct 2001 16:11:31 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA16301 for ; Fri, 19 Oct 2001 16:11:16 -0500 (CDT) Original-Received: (qmail 13007 invoked by alias); 19 Oct 2001 21:11:33 -0000 Original-Received: (qmail 13002 invoked from network); 19 Oct 2001 21:11:32 -0000 Original-Received: from quimby.gnus.org (195.204.10.139) by gnus.org with SMTP; 19 Oct 2001 21:11:32 -0000 Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id XAA11076 for ding@gnus.org; Fri, 19 Oct 2001 23:11:29 +0200 (CEST) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 78 Original-NNTP-Posting-Host: lowell.missioncriticallinux.com Original-X-Trace: quimby.gnus.org 1003525889 27577 208.51.139.16 (19 Oct 2001 21:11:29 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 19 Oct 2001 21:11:29 GMT X-Go-Away: or I shall taunt you a second time! X-PGP-KeyID: 6B21489A X-PGP-CertKey: 61F0 6138 BE7B FEBF A223 E9D1 BFE1 2065 6B21 489A X-Request-PGP: finger:huber@db.debian.org Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39500 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39500 prj@po.cwru.edu (Paul Jarc) writes: > 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))))) Okay, my cluelessness about macros, etc is showing. Notice my hack above: (let ((Mail-Followup-To (message-make-mft))) (message-generate-headers '(optional . Mail-Followup-To)))) This works, but I think because message-generate-headers uses the symbol name for the header name, and the variable value for the value of the header. if I did `((optional . ,Mail-Followup-To)), what would it use for the header name? Wouldn't the value be spliced in, so how would it know what to use? hmm... that function is confusing anyway. what I really want to do is pass in the equivilant of this information: 1. the header is optional (this way it won't ask the user for it if it's empty) 2. the header name is "Mail-Followup-To" 3. the header value is "..." Can someone enlighten me as to how this is supposed to be done? Am I supposed to set the symbol Mail-Followup-To to the contents of the header? Is there another way? > We should also check that this is a mail message, not news. I'm confused. At the top, inside the first let there is a (message-this-is-mail t), but below there are checks to see if this is news...for example: ... (if news nil message-deletable-headers) ... so...what is this? message-send-mail, but sometimes it's used for news? > 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. Okay, I changed it around and use equal instead. > 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. Yeah, that would be better, but extracting the address part might be hard. (have you seen the regexp in the Mastering Regular Expressions book for matching an email address?) I can see splitting the string up by ',' and interatively checking each one of those with each of the regular expressions. Of course, if your regex's are exact enough, then it should work :P (btw, this setup seems to work for me with the utility function I posted for reading all the to-address/list values from group parameters) ttyl, -- Josh Huber