From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40636 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: more MFT address stuff Date: Fri, 30 Nov 2001 15:14:41 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035176156 1980 80.91.224.250 (21 Oct 2002 04:55:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:55:56 +0000 (UTC) Return-Path: Original-Received: (qmail 9390 invoked from network); 30 Nov 2001 20:16:16 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 30 Nov 2001 20:16:16 -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 169u3n-0004fH-00; Fri, 30 Nov 2001 14:14:59 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 30 Nov 2001 14:14:44 -0600 (CST) 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 OAA13388 for ; Fri, 30 Nov 2001 14:14:33 -0600 (CST) Original-Received: (qmail 9322 invoked by alias); 30 Nov 2001 20:14:41 -0000 Original-Received: (qmail 9317 invoked from network); 30 Nov 2001 20:14:41 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (qmail-remote@129.22.96.25) by gnus.org with SMTP; 30 Nov 2001 20:14:41 -0000 Original-Received: (qmail 312 invoked by uid 500); 30 Nov 2001 20:15:03 -0000 Original-To: ding@gnus.org In-Reply-To: (prj@po.cwru.edu's message of "Fri, 30 Nov 2001 13:23:40 -0500") Mail-Copies-To: nobody Mail-Followup-To: ding@gnus.org Original-Lines: 9 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 (i386-redhat-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40636 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40636 --=-=-= I wrote: > Here's a patch to enable support for $QMAILMFTFILE Grr. I should test first next time. This one works. paul --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=message.patch Index: lisp/message.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v retrieving revision 6.171 diff -u -r6.171 message.el --- lisp/message.el 2001/11/30 17:36:17 6.171 +++ lisp/message.el 2001/11/30 20:15:14 @@ -437,6 +437,13 @@ :group 'message-interface :type '(repeat sexp)) +(defcustom message-subscribed-address-file nil + "*A file containing addresses the user is subscribed to. +If nil, do not look at any files to determine list subscriptions. If +non-nil, each line of this file should be a mailing list address." + :group 'message-interface + :type 'string) + (defcustom message-subscribed-addresses nil "*Specifies a list of addresses the user is subscribed to. If nil, do not use any predefined list subscriptions. This list of @@ -2715,6 +2722,7 @@ ;; Generate the Mail-Followup-To header if the header is not there... (if (and (or message-subscribed-regexps message-subscribed-addresses + message-subscribed-address-file message-subscribed-address-functions) (not (mail-fetch-field "mail-followup-to"))) (setq headers @@ -3766,9 +3774,25 @@ (recipients (mapcar 'mail-strip-quoted-names (message-tokenize-header msg-recipients))) + (file-regexps + (if message-subscribed-address-file + (let (begin end item re) + (save-excursion + (with-temp-buffer + (insert-file-contents message-subscribed-address-file) + (while (not (eobp)) + (setq begin (point)) + (forward-line 1) + (setq end (point)) + (if (bolp) (setq end (1- end))) + (setq item (regexp-quote (buffer-substring begin end))) + (if re (setq re (concat re "\\)\\|\\(" item)) + (setq re (concat "\\`\\(" item)))) + (and re (list (concat re "\\)\\'")))))))) (mft-regexps (apply 'append message-subscribed-regexps (mapcar 'regexp-quote message-subscribed-addresses) + file-regexps (mapcar 'funcall message-subscribed-address-functions)))) (save-match-data --=-=-=--