Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <4uce.02.r.steib@gmx.net>
Subject: [Patch] MFT in mml-preview
Date: Mon, 30 Dec 2002 19:59:23 +0100	[thread overview]
Message-ID: <v9ptrj5o50.fsf@marauder.physik.uni-ulm.de> (raw)

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

Hi,

WIBNI we could see the automatically generated Mail-Followup-To header
in the preview (`mml-preview') before sending a message?

I added this to `mml.el'.  Probably it would be better not to
duplicate code from `message.el', but I'm not sure how to do this.

Suggested ChangeLog entry:

--8<---------------cut here---------------start------------->8---
2002-12-30  Reiner Steib  <Reiner.Steib@gmx.de>

	* mml.el (mml-preview-insert-mft): New function.
	(mml-preview): Use it.

	* message.el (message-send-mail): Added comment concerning
	`mml-preview-insert-mft'.

--8<---------------cut here---------------end--------------->8---


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: message.mml-preview-insert-mft.patch --]
[-- Type: text/x-patch, Size: 1546 bytes --]

--- message.el	2002/12/29 18:33:35	6.266
+++ message.el	2002/12/30 15:15:00
@@ -3337,6 +3352,8 @@
     (save-restriction
       (message-narrow-to-headers)
       ;; Generate the Mail-Followup-To header if the header is not there...
+      ;; (Please also change code in `mml-preview-insert-mft',
+      ;; if you change anything here.)
       (if (and (or message-subscribed-regexps
 		   message-subscribed-addresses
 		   message-subscribed-address-file

--- mml.el	2002/12/29 16:03:07	6.65
+++ mml.el	2002/12/30 16:23:12
@@ -1007,6 +1007,19 @@
   (mml-insert-tag 'part 'type type 'disposition "inline")
   (forward-line -1))
 
+(defun mml-preview-insert-mft ()
+  "Insert a Mail-Followup-To header before previewing an article.
+Should be adopted if code in `message-send-mail' is changed."
+  (when (and (message-mail-p)
+	     (or message-subscribed-regexps
+		 message-subscribed-addresses
+		 message-subscribed-address-file
+		 message-subscribed-address-functions)
+	     (not (mail-fetch-field "mail-followup-to"))
+	     (message-make-mft))
+    (message-position-on-field "Mail-Followup-To" "X-Draft-From")
+    (insert (message-make-mft))))
+
 (defun mml-preview (&optional raw)
   "Display current buffer with Gnus, in a new buffer.
 If RAW, don't highlight the article."
@@ -1027,7 +1040,8 @@
 				   "*MIME preview of ") (buffer-name))))
       (erase-buffer)
       (insert-buffer buf)
+      (mml-preview-insert-mft)
       (let ((message-deletable-headers (if (message-news-p)
 					   nil
 					 message-deletable-headers)))

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


Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/

             reply	other threads:[~2002-12-30 18:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-30 18:59 Reiner Steib [this message]
2002-12-30 19:14 ` Lars Magne Ingebrigtsen
2002-12-30 19:54   ` Reiner Steib
2002-12-30 20:21     ` Lars Magne Ingebrigtsen
2002-12-30 22:04 Reiner Steib
2002-12-30 22:24 ` Lars Magne Ingebrigtsen

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=v9ptrj5o50.fsf@marauder.physik.uni-ulm.de \
    --to=4uce.02.r.steib@gmx.net \
    --cc=reiner.steib@gmx.de \
    /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).