Gnus development mailing list
 help / color / mirror / Atom feed
From: Karra <karra@cs.utah.edu>
Subject: Auto gen of MFT header for "unsubscribed" lists. (patch)
Date: Tue, 05 Feb 2002 15:02:06 +0530	[thread overview]
Message-ID: <87ofj4cm0w.fsf@cs.utah.edu> (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.

             reply	other threads:[~2002-02-05  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05  9:32 Karra [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ofj4cm0w.fsf@cs.utah.edu \
    --to=karra@cs.utah.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).