[gnus git] branch master updated: n0-15-21-gc40e5f3 =1= Don't send any marks updates to the server for articles we didn't get any headers for.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  c40e5f3bc3aa4b7e6bd8e5f24d4c45fb7d5460c5 (commit)
      from  68ecaa0640d22b0ec004be2417b0f00015d90ad6 (commit)


- Log -----------------------------------------------------------------
commit c40e5f3bc3aa4b7e6bd8e5f24d4c45fb7d5460c5
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Mar 29 22:09:41 2011 +0200

    Don't send any marks updates to the server for articles we didn't get any headers for.
    
    This is a sanity check.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ad92e28..c65aa99 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-29  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-sum.el (gnus-update-marks): Don't send any marks updates to the
+	server for articles we didn't get any headers for.  This is a sanity
+	check.
+
 2011-03-29  Michael Welsh Duggan  <[email protected]>
 
 	* nnimap.el (nnimap-open-connection-1): Is the login responds with a
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index e1b8775..91dc6fb 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -6068,14 +6068,23 @@ If SELECT-ARTICLES, only select those articles from GROUP."
 		    'request-set-mark gnus-newsgroup-name)
 		   (not (gnus-article-unpropagatable-p (cdr type))))
 	  (let* ((old (cdr (assq (cdr type) (gnus-info-marks info))))
-		 (del (gnus-remove-from-range (gnus-copy-sequence old) list))
-		 (add (gnus-remove-from-range
-		       (gnus-copy-sequence list) old)))
+		 ;; Don't do anything about marks for articles we
+		 ;; didn't actually get any headers for.
+		 (existing (gnus-compress-sequence gnus-newsgroup-articles))
+		 (del
+		  (gnus-sorted-range-intersection
+		   existing
+		   (gnus-remove-from-range (gnus-copy-sequence old) list)))
+		 (add
+		  (gnus-sorted-range-intersection
+		   existing
+		   (gnus-remove-from-range
+		    (gnus-copy-sequence list) old))))
 	    (when add
 	      (push (list add 'add (list (cdr type))) delta-marks))
 	    (when del
-	      ;; Don't delete marks from outside the active range.  This
-	      ;; shouldn't happen, but is a sanity check.
+	      ;; Don't delete marks from outside the active range.
+	      ;; This shouldn't happen, but is a sanity check.
 	      (setq del (gnus-sorted-range-intersection
 			 (gnus-active gnus-newsgroup-name) del))
 	      (push (list del 'del (list (cdr type))) delta-marks))))

-----------------------------------------------------------------------
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   |    6 ++++++
 lisp/gnus-sum.el |   19 ++++++++++++++-----
 2 files changed, 20 insertions(+), 5 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.