Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: Dan Jacobson <jidanni@jidanni.org>
Subject: Re: gnus-summary-wide-reply-with-original ignores following Froms
Date: Mon, 27 Feb 2006 16:29:22 +0900	[thread overview]
Message-ID: <b4mek1p2ral.fsf@jpl.org> (raw)
In-Reply-To: <v94q2offkw.fsf@marauder.physik.uni-ulm.de>

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

>>>>> In <v94q2offkw.fsf@marauder.physik.uni-ulm.de> Reiner Steib wrote:

> On Mon, Jan 23 2006, Dan Jacobson wrote:

>> I use 2SW, but the From of the 2nd message is not put into the To list.
>> gnus-version: "No Gnus v0.4"

> Confirmed.  Could someone please investigate?

I attached a patch for the latest Gnus CVS trunk.  Could you
test it with the `SV' command rather than the `SW' command?

It seems that the `SW' (wide reply) command has not been
designed to gather recipients in all articles to be replied.
Instead, the `SV' (very wide reply) command seems to have aimed
to do that.  However, it has not been achieved, and I think
there's no chance of succeeding in the present way[1] either.
If I don't misunderstand the difference between `SW' and `SV',
the way of my patch will break the deadlock, and will make it
possible to integrate `SW' and `SV'.

Though, so far I don't have an idea to make `message-widen-reply'
and `message-insert-wide-reply' work with several articles as
well, and I also don't have an idea of how to make the References
header for several articles to be replied eitgher.

[1] When performing `very wide reply', `gnus-summary-reply'
gathers headers of all articles into a header of a reply
message, and then `message-get-reply-headers' (or possibly
`message-wide-reply-to-function') parses it.

Here's a patch:

	* gnus-msg.el (gnus-summary-reply): Make recipients very wide for
	very wide reply.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2807 bytes --]

--- gnus-msg.el~	2006-02-08 05:42:05 +0000
+++ gnus-msg.el	2006-02-27 07:27:31 +0000
@@ -1084,31 +1084,60 @@
 	      (car yank)))
 	   (gnus-article-reply (or article (gnus-summary-article-number)))
 	   (gnus-article-yanked-articles yank)
-	   (headers ""))
+	   headers)
       ;; Stripping headers should be specified with mail-yank-ignored-headers.
       (when yank
 	(gnus-summary-goto-subject article))
       (gnus-setup-message (if yank 'reply-yank 'reply)
-	(if (not very-wide)
-	    (gnus-summary-select-article)
-	  (dolist (article very-wide)
-	    (gnus-summary-select-article nil nil nil article)
-	    (save-excursion
-	      (set-buffer (gnus-copy-article-buffer))
-	      (gnus-msg-treat-broken-reply-to)
-	      (save-restriction
-		(message-narrow-to-head)
-		(setq headers (concat headers (buffer-string)))))))
+	(cond ((not very-wide)
+	       (gnus-summary-select-article))
+	      (message-wide-reply-to-function
+	       (dolist (article very-wide)
+		 (gnus-summary-select-article nil nil nil article)
+		 (save-excursion
+		   (set-buffer (gnus-copy-article-buffer))
+		   (gnus-msg-treat-broken-reply-to)
+		   (save-restriction
+		     (message-narrow-to-head)
+		     (setq headers (concat headers (buffer-string)))))))
+	      (t ;; (and very-wide (not message-wide-reply-to-function))
+	       (let (header recipients)
+		 (while very-wide
+		   (gnus-summary-select-article nil nil nil (pop very-wide))
+		   (with-current-buffer (gnus-copy-article-buffer)
+		     (setq headers (message-get-reply-headers t))
+		     (while headers
+		       (if (setq header (assq (caar headers) recipients))
+			   (setcdr header (concat (cdr header) ", "
+						  (cdar headers)))
+			 (push (car headers) recipients))
+		       (setq headers (cdr headers)))))
+		 ;; Remove duplicates.
+		 (let ((message-use-mail-followup-to 'use)
+		       (message-wide-reply-confirm-recipients nil))
+		   (mm-with-multibyte-buffer
+		     (while recipients
+		       (erase-buffer)
+		       (insert "To: " (cdar recipients) "\n")
+		       (push (cons (car (pop recipients))
+				   (mapconcat 'cdr
+					      (message-get-reply-headers t)
+					      ", "))
+			     headers)))))))
 	(set-buffer (gnus-copy-article-buffer))
 	(gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to)
 	(save-restriction
 	  (message-narrow-to-head)
-	  (when very-wide
+	  (when (stringp headers)
 	    (erase-buffer)
 	    (insert headers))
 	  (goto-char (point-max)))
 	(mml-quote-region (point) (point-max))
-	(message-reply nil wide)
+	(let ((message-wide-reply-to-function
+	       (if (consp headers)
+		   `(lambda nil ',(nreverse headers))
+		 message-wide-reply-to-function)))
+	  (message-reply nil wide))
 	(when yank
 	  (gnus-inews-yank-articles yank))
 	(gnus-summary-handle-replysign)))))

  reply	other threads:[~2006-02-27  7:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87lkx72blh.fsf@jidanni.org>
2006-02-25  0:27 ` Reiner Steib
2006-02-27  7:29   ` Katsumi Yamaoka [this message]
2006-02-27 10:09     ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mek1p2ral.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).