From 7002ccf98dc19bd69db1f751745de3fcb3c7a773 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 21 Sep 2010 18:10:05 +0200 Subject: [PATCH] When we have zero articles, return the right data to Gnus. --- lisp/ChangeLog | 3 +++ lisp/nnimap.el | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9975f9151..7e2dfa629 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-21 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-request-group): When we have zero articles, return + the right data to Gnus. + * gnus-sum.el (gnus-summary-move-article): When respooling to the same method, this would bug out. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 3def29444..7822f5003 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -421,14 +421,12 @@ textual parts.") (setq high (nth 3 (car marks)) low (nth 4 (car marks)))) ((re-search-backward "UIDNEXT \\([0-9]+\\)" nil t) - (setq high (string-to-number (match-string 1)) + (setq high (1- (string-to-number (match-string 1))) low 1))))) (erase-buffer) (insert (format - "211 %d %d %d %S\n" - (1+ (- high low)) - low high group)))) + "211 %d %d %d %S\n" (1+ (- high low)) low high group)))) t))) (deffoo nnimap-request-create-group (group &optional server args) -- 2.34.1