nnimap unexist tracking fix
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 10 Apr 2012 22:01:36 +0000 (00:01 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 10 Apr 2012 22:01:36 +0000 (00:01 +0200)
(nnimap-update-info): None of the articles below the active low-water
mark exist

lisp/ChangeLog
lisp/nnimap.el

index d742d0c..274667f 100644 (file)
@@ -1,5 +1,8 @@
 2012-04-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-update-info): None of the articles below the active
+       low-water mark exist.
+
        * dgnushack.el: Get rid of XEmacs compilation warning.
 
        * gnus-msg.el (gnus-summary-cancel-article): See what From header we
index 83100a5..11ebe71 100644 (file)
@@ -1456,15 +1456,20 @@ textual parts.")
                      (push (cons (car type) new-marks) marks)))))
              ;; Keep track of non-existing articles.
              (let* ((old-unexists (assq 'unexist marks))
+                    (active (gnus-active group))
                     (unexists
                      (if completep
                          (gnus-range-difference
-                          (gnus-active group)
+                          active
                           (gnus-compress-sequence existing))
                        (gnus-add-to-range
                         (cdr old-unexists)
                         (gnus-list-range-difference
                          existing (gnus-active group))))))
+               (when (> (car active) 1)
+                 (setq unexists (gnus-range-add
+                                 (cons 1 (1- (car active)))
+                                 unexists)))
                (if old-unexists
                    (setcdr old-unexists unexists)
                  (push (cons 'unexist unexists) marks)))