From 6ed17f119f52dee3199a3efbdf8a92b93f5f8fd0 Mon Sep 17 00:00:00 2001 From: Andrew Cohen Date: Thu, 1 Sep 2011 13:25:09 +0000 Subject: [PATCH] gnus-sum.el: When adding article headers to a summary buffer also update gnus-newsgroup-articles (bug#9386). --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-sum.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 71872b21adb..8646f687420 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-09-01 Andrew Cohen + + * gnus-sum.el: When adding article headers to a summary buffer also + update gnus-newsgroup-articles (bug#9386). + 2011-08-30 Katsumi Yamaoka * auth-source.el: Autoload help-mode. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c01f91973a0..fd441c46d17 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -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)) -- 2.39.2