From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51509 Path: main.gmane.org!not-for-mail From: Michael Shields Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] Hide Reply-To: when broken-reply-to is set Date: Tue, 15 Apr 2003 23:26:47 +0000 Organization: Mad Science Research Labs Sender: ding-owner@lists.math.uh.edu Message-ID: <87r8838hqg.fsf@mulligatwani.msrl.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050449189 14295 80.91.224.249 (15 Apr 2003 23:26:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2003 23:26:29 +0000 (UTC) Original-X-From: ding-owner+M53@lists.math.uh.edu Wed Apr 16 01:26:28 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 195Zop-0003i9-00 for ; Wed, 16 Apr 2003 01:26:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 195ZpI-0004Ms-00; Tue, 15 Apr 2003 18:26:56 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 195ZpE-0004Mn-00 for ding@lists.math.uh.edu; Tue, 15 Apr 2003 18:26:52 -0500 Original-Received: (qmail 34020 invoked by alias); 15 Apr 2003 23:26:52 -0000 Original-Received: (qmail 34015 invoked from network); 15 Apr 2003 23:26:52 -0000 Original-Received: from challah.msrl.com (198.137.194.222) by sclp3.sclp.com with SMTP; 15 Apr 2003 23:26:52 -0000 Original-Received: (qmail 26642 invoked from network); 15 Apr 2003 23:26:47 -0000 Original-Received: from localhost (HELO mulligatwani.msrl.com) (127.0.0.1) by localhost with SMTP; 15 Apr 2003 23:26:47 -0000 Original-To: ding@gnus.org Original-Lines: 114 User-Agent: Gnus/5.090017 (Oort Gnus v0.17) XEmacs/21.4 (Portable Code, linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:51509 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51509 This functionality was discussed in . However, it was submitted by Vasily Korytov, who has no papers on file. Since it was easy, I just wrote my own patch. I've also noted in the manual that setting `broken-reply-to' is a good alternative to habitually using `B r'. lisp/ChangeLog addition: 2003-04-15 Michael Shields * gnus-art.el (article-hide-boring-headers): Hide Reply-To: if the broken-reply-to group parameter is set. Idea from Vasily Korytov . texi/ChangeLog addition: 2003-04-15 Michael Shields * gnus.texi (Group Parameters, Hiding Headers): Document that the broken-reply-to group parameter now also affects header hiding. * gnus.texi (Summary Mail Commands): Suggest setting the broken-reply-to parameter if you find yourself using `B r'. gnus source patch: Diff command: cvs -q diff -u Files affected: lisp/gnus-art.el texi/gnus.texi Index: texi/gnus.texi =================================================================== RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v retrieving revision 6.472 diff -u -r6.472 gnus.texi --- texi/gnus.texi 15 Apr 2003 22:16:22 -0000 6.472 +++ texi/gnus.texi 15 Apr 2003 23:19:56 -0000 @@ -2745,10 +2745,11 @@ @item broken-reply-to @cindex broken-reply-to Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To} -headers in this group are to be ignored. This can be useful if you're -reading a mailing list group where the listserv has inserted -@code{Reply-To} headers that point back to the listserv itself. This is -broken behavior. So there! +headers in this group are to be ignored, and for the header to be hidden +if @code{reply-to} is part of @code{gnus-boring-article-headers}. This +can be useful if you're reading a mailing list group where the listserv +has inserted @code{Reply-To} headers that point back to the listserv +itself. That is broken behavior. So there! @item to-group @cindex to-group @@ -5214,6 +5215,10 @@ @findex gnus-summary-reply-broken-reply-to Mail a reply to the author of the current article but ignore the @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}). +If you need this because a mailing list incorrectly sets a +@code{Reply-To} header pointing to the list, you probably want to set +the @code{broken-reply-to} group parameter instead, so things will work +correctly. @xref{Group Parameters}. @item S B R @kindex S B R (Summary) @@ -10685,7 +10690,8 @@ @code{Newsgroups} header. @item reply-to Remove the @code{Reply-To} header if it lists the same address as the -@code{From} header. +@code{From} header, or if the @code{broken-reply-to} group parameter is +set. @item newsgroups Remove the @code{Newsgroups} header if it only contains the current group name. Index: lisp/gnus-art.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v retrieving revision 6.332 diff -u -r6.332 gnus-art.el --- lisp/gnus-art.el 15 Apr 2003 22:15:42 -0000 6.332 +++ lisp/gnus-art.el 15 Apr 2003 23:20:02 -0000 @@ -1667,15 +1667,18 @@ (message-fetch-field "newsgroups")) (gnus-article-hide-header "followup-to"))) ((eq elem 'reply-to) - (let ((from (message-fetch-field "from")) - (reply-to (message-fetch-field "reply-to"))) - (when (and - from reply-to - (ignore-errors - (gnus-string-equal - (nth 1 (mail-extract-address-components from)) - (nth 1 (mail-extract-address-components reply-to))))) - (gnus-article-hide-header "reply-to")))) + (if (gnus-group-find-parameter + gnus-newsgroup-name 'broken-reply-to) + (gnus-article-hide-header "reply-to") + (let ((from (message-fetch-field "from")) + (reply-to (message-fetch-field "reply-to"))) + (when (and + from reply-to + (ignore-errors + (gnus-string-equal + (nth 1 (mail-extract-address-components from)) + (nth 1 (mail-extract-address-components reply-to))))) + (gnus-article-hide-header "reply-to"))))) ((eq elem 'date) (let ((date (message-fetch-field "date"))) (when (and date -- Shields.