]> git.eshelyaron.com Git - emacs.git/commitdiff
[Backport] lisp/gnus/nnimap.el (nnimap-find-expired-articles): nnimap `never' expirat...
authorElias Oltmanns <eo@nebensachen.de>
Thu, 29 Jan 2015 01:20:00 +0000 (01:20 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 29 Jan 2015 01:20:00 +0000 (01:20 +0000)
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el

index 2bdbfcc5c230a61ba2ebd86686cf78e352bc3528..d0a68b7f0ce6befa82ff7567acecc21fe9b321ed 100644 (file)
@@ -1,10 +1,15 @@
+2015-01-28  Elias Oltmanns  <eo@nebensachen.de>
+
+       * nnimap.el (nnimap-find-expired-articles): Fix handling of
+       (expiry-wait . never).
+
 2014-12-19  Andreas Schwab  <schwab@linux-m68k.org>
 
        * gnus-group.el (gnus-read-ephemeral-bug-group): Bind
        coding-system-for-read and coding-system-for-write only around
        with-temp-file, and make buffer unibyte.  Don't write temp file twice.
 
-2014-11-26  John Mastro <john.b.mastro@gmail.com>  (tiny change)
+2014-11-26  John Mastro  <john.b.mastro@gmail.com>  (tiny change)
 
        * auth-source.el (auth-source-macos-keychain-search-items): Return
        result of `auth-source-macos-keychain-result-append' (bug#19074).
index 8ed5143b243be91c712d8d540ea5daec6ab343ad..199cf4eb740c7806474b9fca0c8e4eccb5485296 100644 (file)
@@ -979,19 +979,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