Gnus development mailing list
 help / color / mirror / Atom feed
* Auto gen of MFT header for "unsubscribed" lists. (patch)
@ 2002-02-05  9:32 Karra
  2002-02-05 16:48 ` ShengHuo ZHU
  2002-02-05 17:29 ` Matt Armstrong
  0 siblings, 2 replies; 6+ messages in thread
From: Karra @ 2002-02-05  9:32 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 294 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: m.diff --]
[-- Type: text/x-patch, Size: 1753 bytes --]

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))))
 
 \f
 

[-- Attachment #3: Type: text/plain, Size: 78 bytes --]



-- 
"Have you ever fought an IDEA, Picard?"
      -- Gowron, Star Trek TNG.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-02-07 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05  9:32 Auto gen of MFT header for "unsubscribed" lists. (patch) Karra
2002-02-05 16:48 ` ShengHuo ZHU
2002-02-05 17:29 ` Matt Armstrong
2002-02-06 10:33   ` Karra
2002-02-06 17:00     ` Paul Jarc
2002-02-07 16:52       ` Matt Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).