From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39507 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: Generating Mail-Followup-To: headers Date: Fri, 19 Oct 2001 17:40:54 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: owner-ding@hpc.uh.edu Message-ID: References: <87y9m9fs6b.fsf@squeaker.lickey.com> <87elo1exsd.fsf@squeaker.lickey.com> <87u1wvkaiv.fsf@mclinux.com> <87zo6nftt7.fsf@mclinux.com> <87669bfi6z.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 1035175207 28376 80.91.224.250 (21 Oct 2002 04:40:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:07 +0000 (UTC) Return-Path: Original-Received: (qmail 13615 invoked from network); 19 Oct 2001 21:42:18 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 19 Oct 2001 21:42:18 -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 15uhOH-0004XT-00; Fri, 19 Oct 2001 16:41:17 -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:40:55 -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 QAA16586 for ; Fri, 19 Oct 2001 16:40:40 -0500 (CDT) Original-Received: (qmail 13597 invoked by alias); 19 Oct 2001 21:40:55 -0000 Original-Received: (qmail 13592 invoked from network); 19 Oct 2001 21:40:55 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (qmail-remote@129.22.96.25) by gnus.org with SMTP; 19 Oct 2001 21:40:55 -0000 Original-Received: (qmail 23159 invoked by uid 500); 19 Oct 2001 21:41:16 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Mail-Copies-To: never In-Reply-To: <87669bfi6z.fsf@mclinux.com> (Josh Huber's message of "Fri, 19 Oct 2001 17:12:04 -0400") Original-Lines: 50 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39507 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39507 Josh Huber wrote: > prj@po.cwru.edu (Paul Jarc) writes: >> (message-generate-headers `((optional . ,Mail-Followup-To))))) > > Okay, my cluelessness about macros, etc is showing. Heh. A macro looks like (defmacro name (args) body). I forget what `(,these) forms are called, but they're not "macros". > 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. Oops, I missed that. We would want the symbol here, then. > 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 "..." A quick test says this should work: (message-generate-headers `(("Mail-Followup-To" . ,(message-make-mft)))) We're giving it a non-empty value, so 'optional shouldn't matter. And the code in message-generate-headers that doesn't use 'optional is less confusing that the code that does, so I'm more confident than I would be if I had tried to use 'optional. > 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?) Fortunately, it's already done. This is from message-get-reply-headers (with my patch from yesterday): ;; Convert string to a list of (("foo@bar" . "Name ") ...). (setq recipients (mapcar (lambda (addr) (cons (mail-strip-quoted-names addr) addr)) (message-tokenize-header recipients))) paul