[gnus git] branch master updated: n0-17-193-g8c0d252 =1= When inserting new headers, keep track of which ones are unread

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  8c0d252681e082751a5925886facbcca21f87377 (commit)
      from  4ea2a1512b176c26b318c5f45c51f8988754b3e7 (commit)


- Log -----------------------------------------------------------------
commit 8c0d252681e082751a5925886facbcca21f87377
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Jul 19 20:04:54 2011 +0200

    When inserting new headers, keep track of which ones are unread

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9303c64..29ed11a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2011-07-19  Lars Magne Ingebrigtsen  <[email protected]>
 
+	* gnus-sum.el (gnus-summary-refer-thread): When inserting new headers,
+	keep track of which ones are unread (bug#9061).
+
 	* gnus.el (gnus-refer-article-method): Allow entering any sexp
 	(bug#9055).
 
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index 245d244..86ff018 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -8982,11 +8982,8 @@ variable."
 	 (gnus-summary-ignore-duplicates t)
 	 (gnus-read-all-available-headers t)
 	 (limit (if limit (prefix-numeric-value limit)
-		  gnus-refer-thread-limit)))
-    (setq gnus-newsgroup-headers
-	  (gnus-delete-duplicate-headers
-	   (gnus-merge
-	    'list gnus-newsgroup-headers
+		  gnus-refer-thread-limit))
+	 (new-headers
 	    (if (gnus-check-backend-function
 		 'request-thread gnus-newsgroup-name)
 		(gnus-request-thread header gnus-newsgroup-name)
@@ -9004,7 +9001,16 @@ variable."
 			(keep-lines
 			 (regexp-opt (append refs (list id subject)))))))
 		(gnus-fetch-headers (list last) (if (numberp limit)
-						    (* 2 limit) limit) t)))
+						  (* 2 limit) limit) t)))))
+    (dolist (header new-headers)
+      (when (member (mail-header-number header) gnus-newsgroup-unselected)
+	(push (mail-header-number header) gnus-newsgroup-unreads)
+	(setq gnus-newsgroup-unselected
+	      (delete (mail-header-number header) gnus-newsgroup-unselected))))
+    (setq gnus-newsgroup-headers
+	  (gnus-delete-duplicate-headers
+	   (gnus-merge
+	    'list gnus-newsgroup-headers new-headers
 	    'gnus-article-sort-by-number)))
     (gnus-summary-limit-include-thread id)))
 

-----------------------------------------------------------------------
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   |    3 +++
 lisp/gnus-sum.el |   46 ++++++++++++++++++++++++++--------------------
 2 files changed, 29 insertions(+), 20 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.