* Re: Remove in-reply-to in received messages
[not found] ` <m3r8kja0zr.fsf@defun.localdomain>
@ 2002-05-21 14:59 ` Patrick Gundlach
0 siblings, 0 replies; only message in thread
From: Patrick Gundlach @ 2002-05-21 14:59 UTC (permalink / raw)
Jesper Harder <harder@myrealbox.com> writes:
Hello,
> Patrick Gundlach <newsgroup@levana.de> writes:
> > how do I remove the In-Reply-to: header in received messages?
>
> You could do something like:
>
> (defun jh-ignore-in-reply-to ()
> (goto-char (point-min))
> (when (re-search-forward "^In-Reply-To:" nil t)
> (beginning-of-line)
> (insert "X-Ignored-")))
>
> (add-hook 'nnmail-prepare-incoming-header-hook 'jh-ignore-in-reply-to)
>
> Which changes "In-Reply-To: .." to "X-Ignored-In-Reply-To: .." in
> incoming mail.
Well, I don't want to delete the In-Reply-To from all messages, only
from selected ones. I have now something extremly ugly (some
copy&paste, some of you code which works fine):
(defun pg-gnus-remove-inreplyto ()
(let ((winconf (current-window-configuration))
(gnus-have-all-headers t)
gnus-article-prepare-hook
gnus-article-decode-hook
gnus-display-mime-function
gnus-break-pages)
(gnus-summary-select-article nil 'force)
(set-buffer gnus-article-buffer)
(gnus-article-edit-mode)
(goto-char (point-min))
(when (re-search-forward "^In-Reply-To:" nil t)
(beginning-of-line)
(insert "X-Ignored-"))
(gnus-article-edit-done)
(setq gnus-prev-winconf winconf))
(gnus-summary-select-article nil 'force))
But since I have no idea of Gnus internals, this seems to work for
me. But, I have now seen, that I also have to remove the References:
header. Is there any predefined function in Gnus?
Patrick
--
I'll fade into the darkness
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-21 14:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <vuelgpb7bu.fsf@levana.de>
[not found] ` <m3r8kja0zr.fsf@defun.localdomain>
2002-05-21 14:59 ` Remove in-reply-to in received messages Patrick Gundlach
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).