From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/484 Path: news.gmane.org!not-for-mail From: Patrick Gundlach Newsgroups: gmane.emacs.gnus.user Subject: Re: Remove in-reply-to in received messages Date: 21 May 2002 16:59:07 +0200 Organization: none Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138667470 7157 80.91.229.2 (31 Jan 2006 00:31:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:31:10 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:27:39 2006 Original-Path: quimby.gnus.org!lackawana.kippona.com!out.nntp.be!propagator2-SanJose!propagator-SanJose!in.nntp.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-koe1.dfn.de!news.uni-dortmund.de!Informatik.Uni-Dortmund.DE!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Sender: gundlach@sol Original-NNTP-Posting-Host: sol.cs.uni-dortmund.de X-Lieblings-Musik: b.i. User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:624 Original-Lines: 53 X-Gnus-Article-Number: 624 Tue Jan 17 17:27:39 2006 Xref: news.gmane.org gmane.emacs.gnus.user:484 Archived-At: Jesper Harder writes: Hello, > Patrick Gundlach 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