From 9545869aac7c0b2af614fbf5116409192655a4c6 Mon Sep 17 00:00:00 2001 From: Andrew G Cohen Date: Mon, 27 Mar 2023 09:37:55 +0800 Subject: [PATCH] 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)) -- 2.39.2