From: Lars Magne Ingebrigtsen Date: Fri, 24 Sep 2010 17:42:04 +0000 (+0200) Subject: (nnimap-update-info): Protect against nil uidnexts. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=a00768cdf1a70e730d4bfea3756e56950bf2ba6e;hp=ccd77ce8a07b554cba62207328a9d3932fddc6ea;p=gnus (nnimap-update-info): Protect against nil uidnexts. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c3b11846..551b4c818 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2010-09-24 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-update-info): Protect against nil uidnexts. + * gnus-cache.el (gnus-cache-braid-heads): When braiding heads, don't use the same article number for all the cached articles. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 7f8868559..16a43423b 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -824,12 +824,20 @@ not done by default on servers that doesn't support that command.") (if (or completep (not (gnus-active group))) (gnus-set-active group - (if (and low high) - (cons low high) + (cond + ((and low high) + (cons low high)) + (uidnext ;; No articles in this group. - (cons uidnext (1- uidnext)))) + (cons uidnext (1- uidnext))) + (start-article + (cons start-article (1- start-article))) + (t + ;; No articles and no uidnext. + nil))) (setcdr (gnus-active group) (or high (1- uidnext)))) - (unless high + (when (and (not high) + uidnext) (setq high (1- uidnext))) ;; Then update the list of read articles. (let* ((unread