commit af6a2801a6270e475e093f50bc37145b63f602d9 (HEAD, refs/heads/master) Author: Elias Oltmanns Date: Sat May 31 14:54:10 2014 +0200 nnimap.el (nnimap-find-expired-articles): Fix handling of (expiry-wait . never). Modified lisp/nnimap.el diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 1730bd4..2cf26a8 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -995,19 +995,20 @@ textual parts.") (defun nnimap-find-expired-articles (group) (let ((cutoff (nnmail-expired-article-p group nil nil))) - (with-current-buffer (nnimap-buffer) - (let ((result - (nnimap-command - "UID SEARCH SENTBEFORE %s" - (format-time-string - (format "%%d-%s-%%Y" - (upcase - (car (rassoc (nth 4 (decode-time cutoff)) - parse-time-months)))) - cutoff)))) - (and (car result) - (delete 0 (mapcar #'string-to-number - (cdr (assoc "SEARCH" (cdr result)))))))))) + (when cutoff + (with-current-buffer (nnimap-buffer) + (let ((result + (nnimap-command + "UID SEARCH SENTBEFORE %s" + (format-time-string + (format "%%d-%s-%%Y" + (upcase + (car (rassoc (nth 4 (decode-time cutoff)) + parse-time-months)))) + cutoff)))) + (and (car result) + (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result))))))))))) (defun nnimap-find-article-by-message-id (group server message-id [back]