From 10ed4c0a1bf92fb68d14637633fa4258525abe7a Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 27 Sep 2010 19:31:23 +0200 Subject: [PATCH] Copy the old-high watermark so that nothing alters it while scanning for new messages. --- lisp/ChangeLog | 4 ++++ lisp/gnus-sum.el | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfee594eb..e01cf908c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2010-09-27 Lars Magne Ingebrigtsen + * gnus-sum.el (gnus-summary-move-article): Add comment. + (gnus-summary-insert-new-articles): Copy the old-high watermark so that + nothing alters it while scanning for new messages. + * nnimap.el (nnimap-request-accept-article): Send a "." at the end, which may or may not help. (nnimap-open-connection): If we're doing a stream connection, and then diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 2f8abe61e..fbda260c9 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9797,6 +9797,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (not (memq article gnus-newsgroup-unreads))) ;; Mark this article as read in this group. (push (cons to-article gnus-read-mark) gnus-newsgroup-reads) + ;; Increase the active status of this group. (setcdr (gnus-active to-group) to-article) (setcdr gnus-newsgroup-active to-article)) @@ -12624,13 +12625,13 @@ If ALL is a number, fetch this number of articles." (interactive) (prog1 (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<)) - (old-active gnus-newsgroup-active) + (old-high (cdr gnus-newsgroup-active)) (nnmail-fetched-sources (list t)) i new) (setq gnus-newsgroup-active (gnus-activate-group gnus-newsgroup-name 'scan)) (setq i (cdr gnus-newsgroup-active)) - (while (> i (cdr old-active)) + (while (> i old-high) (push i new) (decf i)) (if (not new) -- 2.25.1