emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9545869aac7 2/5: Keep the gnus active range current while getting


From: Andrew G Cohen
Subject: master 9545869aac7 2/5: Keep the gnus active range current while getting articles
Date: Sun, 9 Apr 2023 02:46:17 -0400 (EDT)

branch: master
commit 9545869aac7c0b2af614fbf5116409192655a4c6
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>

    Keep the gnus active range current while getting articles
    
    * lisp/gnus/gnus-group.el (gnus-group-get-new-news-this-group):
    * lisp/gnus/gnus-group.el (gnus-get-unread-articles-in-group): Update
    the current value of the active range since it might have changed.
---
 lisp/gnus/gnus-group.el | 3 ++-
 lisp/gnus/gnus-start.el | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 070d1223e2c..8c1d7e3c86a 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4195,7 +4195,8 @@ If DONT-SCAN is non-nil, scan non-activated groups as 
well."
          (let ((info (gnus-get-info group))
                (active (gnus-active group)))
            (when info
-             (gnus-request-update-info info method))
+              (gnus-request-update-info info method)
+              (setq active (gnus-active group)))
            (gnus-get-unread-articles-in-group info active)
            (unless (gnus-virtual-group-p group)
              (gnus-close-group group))
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index d59b5b58ceb..19b8b09de03 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1490,7 +1490,8 @@ backend check whether the group actually exists."
               (gnus-request-update-info
                info (inline (gnus-find-method-for-group
                              (gnus-info-group info)))))
-      (gnus-activate-group (gnus-info-group info) nil t))
+      (gnus-activate-group (gnus-info-group info) nil t)
+      (setq active (gnus-active (gnus-info-group info))))
 
     (let* ((range (gnus-info-read info))
           (num 0))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]