From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/42921 Path: main.gmane.org!not-for-mail From: Karra Newsgroups: gmane.emacs.gnus.general Subject: Auto gen of MFT header for "unsubscribed" lists. (patch) Date: Tue, 05 Feb 2002 15:02:06 +0530 Sender: owner-ding@hpc.uh.edu Message-ID: <87ofj4cm0w.fsf@cs.utah.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035178097 14763 80.91.224.250 (21 Oct 2002 05:28:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:28:17 +0000 (UTC) Return-Path: Original-Received: (qmail 14745 invoked from network); 5 Feb 2002 15:36:28 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 5 Feb 2002 15:36:28 -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 16Y7dk-0003PZ-00; Tue, 05 Feb 2002 09:36:12 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 05 Feb 2002 09:35:48 -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 JAA25551 for ; Tue, 5 Feb 2002 09:34:24 -0600 (CST) Original-Received: (qmail 14721 invoked by alias); 5 Feb 2002 15:34:21 -0000 Original-Received: (qmail 14716 invoked from network); 5 Feb 2002 15:34:19 -0000 Original-Received: from unknown (HELO Gowron) (mail@210.214.0.152) by gnus.org with SMTP; 5 Feb 2002 15:34:19 -0000 Original-Received: from karra by Gowron with local (Exim 3.12 #1 (Debian)) id 16Y1y7-0000CI-00 for ; Tue, 05 Feb 2002 15:02:51 +0530 Mail-Copies-To: nobody Original-To: ding@gnus.org X-Attribution: karra Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) Original-Lines: 68 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:42921 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:42921 --=-=-= C-c C-f C-m inserts an empty MFT header. The following patch introduces a new function and key binding C-c C-f C-a that will insert a MFT header containing the address in the To field and the user's mail address. This should be helpful when sending mails to lists one is not subscribed to. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=m.diff Index: lisp/message.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v retrieving revision 6.200 diff -u -r6.200 message.el --- lisp/message.el 2002/02/04 20:45:06 6.200 +++ lisp/message.el 2002/02/05 15:35:34 @@ -1545,6 +1545,7 @@ (define-key message-mode-map "\C-c\C-f\C-k" 'message-goto-keywords) (define-key message-mode-map "\C-c\C-f\C-u" 'message-goto-summary) (define-key message-mode-map "\C-c\C-f\C-i" 'message-insert-or-toggle-importance) + (define-key message-mode-map "\C-c\C-f\C-a" 'message-gen-unsubscribed-mft) (define-key message-mode-map "\C-c\C-b" 'message-goto-body) (define-key message-mode-map "\C-c\C-i" 'message-goto-signature) @@ -1923,6 +1924,26 @@ (forward-line 1) (goto-char (point-max)) nil)) + +(defun message-gen-unsubscribed-mft (&optional include-cc) + "Insert a reasonable MFT header in a post to an unsubscribed list. +When making original posts to a mailing list you are not subscribed to, +you have to type in a MFT header by hand. The contents, usually, are +the addresses of the list and your own address. This function inserts +such a header automatically. It fetches the contents of the To: header +in the current mail buffer, and appends the current user-mail-address. + +If the optional argument `include-cc' is non-nil, the addresses in the +Cc: header are also put into the MFT." + + (interactive) + (message-remove-header "Mail-Followup-To") + (let* ((cc (and include-cc (message-fetch-field "Cc"))) + (tos (if cc + (concat (message-fetch-field "To") "," cc) + (message-fetch-field "To")))) + (message-goto-mail-followup-to) + (insert (concat tos ", " user-mail-address)))) --=-=-= -- "Have you ever fought an IDEA, Picard?" -- Gowron, Star Trek TNG. --=-=-=--