From: Dave Abrahams Date: Sat, 1 Sep 2012 04:47:35 +0000 (-0700) Subject: Account for the fact that nnimap-change-group can return t X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;ds=sidebyside;h=f36869c21744af08b25be653bdbaa81617f43ef8;p=gnus Account for the fact that nnimap-change-group can return t --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 900b18aa9..a28d86ab7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -22,8 +22,8 @@ * gnus-registry.el (gnus-try-warping-via-registry): Don't act as though you've found the article when you haven't. - * nnimap.el (nnimap-find-article-by-message-id): Revert 2012-06-19 - change: "Add recent argument" by Julien Danjou + * nnimap.el (nnimap-find-article-by-message-id): Account for the fact that + nnimap-change-group can return t 2012-08-31 Stefan Monnier diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 4952c4ec6..53bc2dd9f 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -985,11 +985,13 @@ textual parts.") If LIMIT, first try to limit the search to the N last articles." (with-current-buffer (nnimap-buffer) (erase-buffer) - (let* ((number-of-article - (catch 'found - (dolist (result (cdr (nnimap-change-group group server nil t))) - (when (equal "EXISTS" (cadr result)) - (throw 'found (car result)))))) + (let* ((change-group-result (nnimap-change-group group server nil t)) + (number-of-article + (and (listp change-group-result) + (catch 'found + (dolist (result (cdr change-group-result)) + (when (equal "EXISTS" (cadr result)) + (throw 'found (car result))))))) (sequence (nnimap-send-command "UID SEARCH%s HEADER Message-Id %S" (if (and limit number-of-article)