Copy the old-high watermark so that nothing alters it while scanning for new messages.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 27 Sep 2010 17:31:23 +0000 (19:31 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 27 Sep 2010 17:31:23 +0000 (19:31 +0200)
lisp/ChangeLog
lisp/gnus-sum.el

index cfee594..e01cf90 100644 (file)
@@ -1,5 +1,9 @@
 2010-09-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * 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
index 2f8abe6..fbda260 100644 (file)
@@ -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)