[gnus git] branch master updated: m0-3-128-gbd3ad33 =1= Use the correct From header when cancelling articles.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  bd3ad33306f70f11226feb9261aa744994242899 (commit)
      from  15cce81ca2258ad31d56b8750d554f6de554fd6a (commit)


- Log -----------------------------------------------------------------
commit bd3ad33306f70f11226feb9261aa744994242899
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Apr 10 22:27:04 2012 +0200

    Use the correct From header when cancelling articles.
    
    * gnus-msg.el (gnus-summary-cancel-article): See what From header we
    would have gotten if we posted to the group, and use that to compare
    against the message we want to cancel (bug#10808).

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 162a5b7..493a7c8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
 2012-04-10  Lars Magne Ingebrigtsen  <[email protected]>
 
+	* gnus-msg.el (gnus-summary-cancel-article): See what From header we
+	would have gotten if we posted to the group, and use that to compare
+	against the message we want to cancel (bug#10808).
+
 	* gnus-sum.el (gnus-auto-center-summary): `scroll-margin' isn't defined
 	on XEmacs.
 
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 6cf0837..52f0991 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -841,9 +841,21 @@ post using the current select method."
   (interactive (gnus-interactive "P\ny"))
   (let ((message-post-method
 	 `(lambda (arg)
-	    (gnus-post-method (eq ',symp 'a) ,gnus-newsgroup-name))))
+	    (gnus-post-method (eq ',symp 'a) ,gnus-newsgroup-name)))
+	(user-mail-address user-mail-address))
     (dolist (article (gnus-summary-work-articles n))
       (when (gnus-summary-select-article t nil nil article)
+	;; Pretend that we're doing a followup so that we can see what
+	;; the From header would have ended up being.
+	(save-window-excursion
+	  (save-excursion
+	    (gnus-summary-followup nil)
+	    (let ((from (message-fetch-field "from")))
+	      (when from
+		(setq user-mail-address
+		      (car (mail-header-parse-address from)))))
+	    (kill-buffer (current-buffer))))
+	;; Now cancel the article using the From header we got.
 	(when (gnus-eval-in-buffer-window gnus-original-article-buffer
 		(message-cancel-news))
 	  (gnus-summary-mark-as-read article gnus-canceled-mark)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    4 ++++
 lisp/gnus-msg.el |   14 +++++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.