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

* Re: Auto gen of MFT header for "unsubscribed" lists. (patch)
  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
  1 sibling, 0 replies; 6+ messages in thread
From: ShengHuo ZHU @ 2002-02-05 16:48 UTC (permalink / raw)


Karra <karra@cs.utah.edu> writes:

> 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.

Installed. Thanks.

ShengHuo



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

* Re: Auto gen of MFT header for "unsubscribed" lists. (patch)
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Matt Armstrong @ 2002-02-05 17:29 UTC (permalink / raw)


Karra <karra@cs.utah.edu> writes:

> 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.

I'm not opposed to this patch (more features good ugh grunt ugh!) but
when there is no MFT header, the default reply-to behavior is supposed
to be used, which includes the sender and any recipients.  In other
words, message-gen-unsubscribed-mft inserts what is the default
anyway.

Have you found cases where this is necessary?

-- 
matt



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

* Re: Auto gen of MFT header for "unsubscribed" lists. (patch)
  2002-02-05 17:29 ` Matt Armstrong
@ 2002-02-06 10:33   ` Karra
  2002-02-06 17:00     ` Paul Jarc
  0 siblings, 1 reply; 6+ messages in thread
From: Karra @ 2002-02-06 10:33 UTC (permalink / raw)


Matt Armstrong <matt@lickey.com> writes:

> I'm not opposed to this patch (more features good ugh grunt ugh!)
> but when there is no MFT header, the default reply-to behavior is
> supposed to be used, which includes the sender and any recipients.
> In other words, message-gen-unsubscribed-mft inserts what is the
> default anyway.
>
> Have you found cases where this is necessary?

Hm... there is the difference between reply, wide reply, and followup,
right?  An explicit MFT clearly tells the recipients what the sender
has in mind... - this reduces the assumptions on part of the other
party (human/mail client).  Most people, I would guess, would err on
the side of caution and copy the author as well; but it does not hurt
to be a little precise, now does it? :)

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



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

* Re: Auto gen of MFT header for "unsubscribed" lists. (patch)
  2002-02-06 10:33   ` Karra
@ 2002-02-06 17:00     ` Paul Jarc
  2002-02-07 16:52       ` Matt Armstrong
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Jarc @ 2002-02-06 17:00 UTC (permalink / raw)


Karra <karra@cs.utah.edu> wrote:
> Hm... there is the difference between reply, wide reply, and followup,
> right?

There's a difference between reply and wide reply.  I don't think
there's a difference between wide reply and followup as far as MFT is
concerned; I think Gnus calls it "followup" if it's news and "wide
reply" if it's mail.

> An explicit MFT clearly tells the recipients what the sender has in
> mind... - this reduces the assumptions on part of the other party
> (human/mail client).  Most people, I would guess, would err on the
> side of caution and copy the author as well; but it does not hurt to
> be a little precise, now does it? :)

Nod.  Also note that an explicit MFT will override someone else's
to-list parameter, if they're using a Gnus that knows about both.


paul



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

* Re: Auto gen of MFT header for "unsubscribed" lists. (patch)
  2002-02-06 17:00     ` Paul Jarc
@ 2002-02-07 16:52       ` Matt Armstrong
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Armstrong @ 2002-02-07 16:52 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> Karra <karra@cs.utah.edu> wrote:
>
>> An explicit MFT clearly tells the recipients what the sender has in
>> mind... - this reduces the assumptions on part of the other party
>> (human/mail client).  Most people, I would guess, would err on the
>> side of caution and copy the author as well; but it does not hurt
>> to be a little precise, now does it? :)
>
> Nod.  Also note that an explicit MFT will override someone else's
> to-list parameter, if they're using a Gnus that knows about both.

Would it be useful to have a Gnus option to always generate a
Mail-Followup-To: header (at least for non-news postings)?  It would
do what it does now, but if it finds no subscribed addresses, it'd
generate a MFT with the contents of To: Cc: and From:.

-- 
matt



^ 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).