]> git.eshelyaron.com Git - emacs.git/commitdiff
nnimap `never' expiration fix
authorElias Oltmanns <eo@nebensachen.de>
Wed, 28 Jan 2015 05:35:59 +0000 (16:35 +1100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 28 Jan 2015 05:35:59 +0000 (16:35 +1100)
* nnimap.el (nnimap-find-expired-articles): Fix handling of
(expiry-wait . never).

lisp/gnus/ChangeLog
lisp/gnus/nnimap.el

index 7bf4a6e01d63bac961df60436c2d2832793da0bd..49d1444de695e0ff60cfc310d391a795abba368d 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-28  Elias Oltmanns  <eo@nebensachen.de>
+
+       * nnimap.el (nnimap-find-expired-articles): Fix handling of
+       (expiry-wait . never).
+
 2015-01-27  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * nnir.el (nnir-imap-expr-to-imap): Check for literal+ capability in
index 8e81abcf9c012a53c6b47e26baf239f400fa250c..ba2013e2798733da3a7ac22483148d6d6e9ea835 100644 (file)
@@ -1020,20 +1020,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
                                                &optional limit)