* [PATCH] Removing headers from message when resending.
@ 2002-04-23 7:45 Matthieu Moy
2002-04-23 16:06 ` Kai Großjohann
0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Moy @ 2002-04-23 7:45 UTC (permalink / raw)
Hi !
I have made a slight modification to gnus-summary-resend-message-edit,
which I had written some time ago. It now removes headers like
forwarding does. Can someone apply it ?
--
Matthieu
(defcustom message-resend-ignored-headers "^Content-Transfer-Encoding:\\|^X-Gnus\\|^Received:\\|^X-"
"*All headers that match this regexp will be deleted when forwarding a message."
:version "21.1"
:group 'message-forwarding
:type '(choice (const :tag "None" nil)
regexp))
;;;###autoload
(defun gnus-summary-resend-article-edit ()
"In gnus summary mode, resend an article that has already been sent.
A new buffer will be created to allow the user to modify body and
contents of the message, and then, everything will happen as when
composing a new message."
(interactive)
(let ((article (gnus-summary-article-number)))
(gnus-setup-message 'reply-yank
(gnus-summary-select-article t)
(set-buffer gnus-original-article-buffer)
(let ((cur (current-buffer))
(to (message-fetch-field "to")))
;; Get a normal message buffer.
(message-pop-to-buffer (message-buffer-name "Resend" to))
(insert-buffer-substring cur)
(mime-to-mml)
(message-narrow-to-head-1)
;; Gnus will generate a new one when sending.
(message-remove-header "Message-ID")
(message-remove-header message-resend-ignored-headers t)
;; Remove unwanted headers.
(goto-char (point-max))
(insert mail-header-separator)
(goto-char (point-min))
(re-search-forward "^To: *\\|^Newsgroups: *" nil 'move)
(widen)
)
)))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Removing headers from message when resending.
2002-04-23 7:45 [PATCH] Removing headers from message when resending Matthieu Moy
@ 2002-04-23 16:06 ` Kai Großjohann
2002-04-23 16:42 ` Matthieu Moy
0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2002-04-23 16:06 UTC (permalink / raw)
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> I have made a slight modification to gnus-summary-resend-message-edit,
> which I had written some time ago. It now removes headers like
> forwarding does. Can someone apply it ?
Will fix in a jiffy. The command name is different, and the variable
was already there. message-resend already removes the headers.
kai
--
Silence is foo!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Removing headers from message when resending.
2002-04-23 16:06 ` Kai Großjohann
@ 2002-04-23 16:42 ` Matthieu Moy
0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Moy @ 2002-04-23 16:42 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>
>> I have made a slight modification to gnus-summary-resend-message-edit,
>> which I had written some time ago. It now removes headers like
>> forwarding does. Can someone apply it ?
>
> Will fix in a jiffy. The command name is different,
Yes, sorry. I originally had prefixed it with my name, and it had been
renamed when included in gnus. I didn't upgrade since that time.
Thanks,
--
Matthieu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-23 16:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23 7:45 [PATCH] Removing headers from message when resending Matthieu Moy
2002-04-23 16:06 ` Kai Großjohann
2002-04-23 16:42 ` Matthieu Moy
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).