gnus-sum.el: When adding article headers to a summary buffer also update gnus-newsgro...
authorAndrew Cohen <cohen@andy.bu.edu>
Thu, 1 Sep 2011 13:25:09 +0000 (13:25 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 1 Sep 2011 13:25:09 +0000 (13:25 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-sum.el

index 71872b2..8646f68 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-01  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * gnus-sum.el: When adding article headers to a summary buffer also
+       update gnus-newsgroup-articles (bug#9386).
+
 2011-08-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * auth-source.el: Autoload help-mode.
index c01f919..fd441c4 100644 (file)
@@ -8630,6 +8630,8 @@ fetched for this group."
           'list gnus-newsgroup-headers
           (gnus-fetch-headers articles nil t)
           'gnus-article-sort-by-number))
+    (setq gnus-newsgroup-articles
+         (gnus-sorted-nunion gnus-newsgroup-articles articles))
     (gnus-summary-limit (append articles gnus-newsgroup-limit))))
 
 (defun gnus-summary-limit-exclude-dormant ()
@@ -9022,9 +9024,11 @@ non-numeric or nil fetch the number specified by the
                      (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))))
+        article-ids)
     (when (listp new-headers)
       (dolist (header new-headers)
+       (push (mail-header-number header) article-ids)
        (when (member (mail-header-number header) gnus-newsgroup-unselected)
           (push (mail-header-number header) gnus-newsgroup-unreads)
           (setq gnus-newsgroup-unselected
@@ -9035,6 +9039,8 @@ non-numeric or nil fetch the number specified by the
              (gnus-merge
               'list gnus-newsgroup-headers new-headers
               'gnus-article-sort-by-number)))
+      (setq gnus-newsgroup-articles
+           (gnus-sorted-nunion gnus-newsgroup-articles (nreverse article-ids)))
       (gnus-summary-limit-include-thread id))))
 
 (defun gnus-summary-refer-article (message-id)
@@ -12743,6 +12749,8 @@ returned."
                      gnus-newsgroup-headers
                      (gnus-fetch-headers articles)
                      'gnus-article-sort-by-number))
+    (setq gnus-newsgroup-articles
+         (gnus-sorted-nunion gnus-newsgroup-articles articles))
     ;; Suppress duplicates?
     (when gnus-suppress-duplicates
       (gnus-dup-suppress-articles))