From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40635 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: more MFT address stuff Date: Fri, 30 Nov 2001 13:23:40 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035176155 1979 80.91.224.250 (21 Oct 2002 04:55:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:55:55 +0000 (UTC) Return-Path: Original-Received: (qmail 7305 invoked from network); 30 Nov 2001 18:24:40 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 30 Nov 2001 18:24:40 -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 169sKK-00042a-00; Fri, 30 Nov 2001 12:23:56 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 30 Nov 2001 12:23:42 -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 MAA13008 for ; Fri, 30 Nov 2001 12:23:32 -0600 (CST) Original-Received: (qmail 7283 invoked by alias); 30 Nov 2001 18:23:42 -0000 Original-Received: (qmail 7278 invoked from network); 30 Nov 2001 18:23:42 -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 18:23:42 -0000 Original-Received: (qmail 5055 invoked by uid 500); 30 Nov 2001 18:24:02 -0000 Original-To: ding@gnus.org Mail-Copies-To: nobody Mail-Followup-To: ding@gnus.org Original-Lines: 10 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:40635 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40635 --=-=-= Here's a patch to enable support for $QMAILMFTFILE (or any other file containing a list of subscribed addresses). Dunno if "*" is appropriate for this variable's docstring. ChangeLog entry: * message.el: New variable message-subscribed-address-file; use it in message-make-mft. From Paul Jarc . paul --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=message.patch Content-Description: subscribed addresses file 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 18:22:13 @@ -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,11 +3774,27 @@ (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) (mapcar 'funcall - message-subscribed-address-functions)))) + message-subscribed-address-functions) + file-regexps))) (save-match-data (when (eval (apply 'append '(or) (mapcar --=-=-=--