From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/32989 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: Mail-{Followup,Reply}-To Date: 27 Oct 2000 11:30:40 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035169177 22795 80.91.224.250 (21 Oct 2002 02:59:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:59:37 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 2464DD049A for ; Fri, 27 Oct 2000 11:42:37 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB28801; Fri, 27 Oct 2000 10:32:07 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 27 Oct 2000 10:31:08 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id KAA21140 for ; Fri, 27 Oct 2000 10:30:51 -0500 (CDT) Original-Received: from multivac.student.cwru.edu (multivac.STUDENT.CWRU.Edu [129.22.239.69]) by mailhost.sclp.com (Postfix) with SMTP id C5E36D049A for ; Fri, 27 Oct 2000 11:31:10 -0400 (EDT) Original-Received: (qmail 10425 invoked by uid 500); 27 Oct 2000 15:31:02 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "24 Oct 2000 11:52:06 +0200" Original-Lines: 11 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:32989 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:32989 --=-=-= Ok, this patch (against 5.8.7) makes Gnus obey MFT and MRT when constructing replies. MRT takes precedence over Reply-To/From; MFT takes precedence over Mail-Copies-To/To+Cc. (It's unlikely that MFT and MCT would both be set, and it simplified the code to let one take precedence. MFT was designed for mail, MCT for news, so I went with MFT.) paul --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=message.el.patch *** gnus/message.el Sat Jul 1 07:10:27 2000 --- message.el Wed Nov 15 23:07:39 2000 *************** *** 1621,1627 **** (mail-fetch-field "to") (not (string-match "\\` *\\'" (mail-fetch-field "to")))) (insert ", ")) ! (insert (or (message-fetch-reply-field "reply-to") (message-fetch-reply-field "from") ""))) (defun message-widen-reply () --- 1621,1628 ---- (mail-fetch-field "to") (not (string-match "\\` *\\'" (mail-fetch-field "to")))) (insert ", ")) ! (insert (or (message-fetch-reply-field "mail-reply-to") ! (message-fetch-reply-field "reply-to") (message-fetch-reply-field "from") ""))) (defun message-widen-reply () *************** *** 3630,3642 **** (Subject . ,(or subject "")))))) (defun message-get-reply-headers (wide &optional to-address) ! (let (follow-to mct never-mct from to cc reply-to ccalist) ;; Find all relevant headers we need. (setq from (message-fetch-field "from") to (message-fetch-field "to") cc (message-fetch-field "cc") mct (message-fetch-field "mail-copies-to") ! reply-to (message-fetch-field "reply-to")) ;; Handle special values of Mail-Copies-To. (when mct --- 3631,3645 ---- (Subject . ,(or subject "")))))) (defun message-get-reply-headers (wide &optional to-address) ! (let (follow-to mct never-mct from to cc reply-to mrt mft ccalist) ;; Find all relevant headers we need. (setq from (message-fetch-field "from") to (message-fetch-field "to") cc (message-fetch-field "cc") mct (message-fetch-field "mail-copies-to") ! reply-to (message-fetch-field "reply-to") ! mrt (message-fetch-field "mail-reply-to") ! mft (message-fetch-field "mail-followup-to")) ;; Handle special values of Mail-Copies-To. (when mct *************** *** 3646,3667 **** (setq mct nil)) ((or (equal (downcase mct) "always") (equal (downcase mct) "poster")) ! (setq mct (or reply-to from))))) (if (or (not wide) to-address) (progn ! (setq follow-to (list (cons 'To (or to-address reply-to from)))) ! (when (and wide mct) ! (push (cons 'Cc mct) follow-to))) (let (ccalist) (save-excursion (message-set-work-buffer) ! (unless never-mct ! (insert (or reply-to from ""))) ! (insert (if to (concat (if (bolp) "" ", ") to "") "")) ! (insert (if mct (concat (if (bolp) "" ", ") mct) "")) ! (insert (if cc (concat (if (bolp) "" ", ") cc) "")) (goto-char (point-min)) (while (re-search-forward "[ \t]+" nil t) (replace-match " " t t)) --- 3649,3690 ---- (setq mct nil)) ((or (equal (downcase mct) "always") (equal (downcase mct) "poster")) ! (setq mct (or mrt reply-to from))))) (if (or (not wide) to-address) (progn ! (setq follow-to (list (cons 'To (or to-address mrt reply-to from)))) ! (when (and wide (or mft mct)) ! (push (cons 'Cc (or mft mct)) follow-to))) (let (ccalist) (save-excursion (message-set-work-buffer) ! (if (and mft ! message-use-followup-to ! (or (not (eq message-use-followup-to 'ask)) ! (message-y-or-n-p ! (concat "Obey Mail-Followup-To: " mft "? ") t "\ ! You should normally obey the Mail-Followup-To: header. ! ! `Mail-Followup-To: " mft "' ! directs your response to " (if (string-match "," mft) ! "the specified addresses" ! "that address only") ". ! ! If a message is posted to several mailing lists, Mail-Followup-To is ! often used to direct the following discussion to one list only, ! because discussions that are spread over several lists tend to be ! fragmented and very difficult to follow. ! ! Also, some source/announcement lists are not indented for discussion; ! responses here are directed to other addresses."))) ! (insert mft) ! (unless never-mct ! (insert (or mrt reply-to from ""))) ! (insert (if to (concat (if (bolp) "" ", ") to "") "")) ! (insert (if mct (concat (if (bolp) "" ", ") mct) "")) ! (insert (if cc (concat (if (bolp) "" ", ") cc) ""))) (goto-char (point-min)) (while (re-search-forward "[ \t]+" nil t) (replace-match " " t t)) *************** *** 3672,3678 **** (goto-char (point-min)) ;; Perhaps "Mail-Copies-To: never" removed the only address? (when (eobp) ! (insert (or reply-to from ""))) (setq ccalist (mapcar (lambda (addr) --- 3695,3701 ---- (goto-char (point-min)) ;; Perhaps "Mail-Copies-To: never" removed the only address? (when (eobp) ! (insert (or mrt reply-to from ""))) (setq ccalist (mapcar (lambda (addr) *************** *** 3760,3766 **** (interactive) (require 'gnus-sum) ; for gnus-list-identifiers (let ((cur (current-buffer)) ! from subject date reply-to mct references message-id follow-to (inhibit-point-motion-hooks t) (message-this-is-news t) --- 3783,3789 ---- (interactive) (require 'gnus-sum) ; for gnus-list-identifiers (let ((cur (current-buffer)) ! from subject date reply-to mrt mct references message-id follow-to (inhibit-point-motion-hooks t) (message-this-is-news t) *************** *** 3783,3788 **** --- 3806,3812 ---- newsgroups (message-fetch-field "newsgroups") posted-to (message-fetch-field "posted-to") reply-to (message-fetch-field "reply-to") + mrt (message-fetch-field "mail-reply-to") distribution (message-fetch-field "distribution") mct (message-fetch-field "mail-copies-to")) (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) *************** *** 3820,3826 **** does not read the newsgroup, so he wouldn't see any replies sent to it.")) (progn (setq message-this-is-news nil) ! (cons 'To (or reply-to from ""))) (cons 'Newsgroups newsgroups))) (t (if (or (equal followup-to newsgroups) --- 3844,3850 ---- does not read the newsgroup, so he wouldn't see any replies sent to it.")) (progn (setq message-this-is-news nil) ! (cons 'To (or mrt reply-to from ""))) (cons 'Newsgroups newsgroups))) (t (if (or (equal followup-to newsgroups) *************** *** 3856,3862 **** (equal (downcase mct) "nobody")))) (list (cons 'Cc (if (or (equal (downcase mct) "always") (equal (downcase mct) "poster")) ! (or reply-to from "") mct))))) cur) --- 3880,3886 ---- (equal (downcase mct) "nobody")))) (list (cons 'Cc (if (or (equal (downcase mct) "always") (equal (downcase mct) "poster")) ! (or mrt reply-to from "") mct))))) cur) --=-=-=--