>From c0b8589b1686d8488b4765783536217b7bb77b6c Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sun, 7 Jul 2019 16:25:14 -0700 Subject: [PATCH] Make sure gnus-group-set-info sets both the hashtable and alist * lisp/gnus/gnus-group.el (gnus-group-set-info): Apparently this method of updating the group info will only apply to the gnus-newsrc-hashtb, not gnus-newsrc-alist. Do the alist explicitly. --- lisp/gnus/gnus-group.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index ea695aaa97..2668e4fb7c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -4506,7 +4506,14 @@ gnus-group-set-info (when (and (not (eq (car entry) t)) (gnus-active (gnus-info-group info))) (setcar entry (length - (gnus-list-of-unread-articles (car info)))))) + (gnus-list-of-unread-articles (car info))))) + ;; The above `setcar' will only affect the hashtable, not + ;; the alist: update the alist separately. + (push info (cdr (setq gnus-newsrc-alist + (remove (assoc-string + (gnus-info-group info) + gnus-newsrc-alist) + gnus-newsrc-alist))))) (error "No such group: %s" (gnus-info-group info)))))) ;; Ad-hoc function for inserting data from a different newsrc.eld -- 2.22.0