summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Oltmanns <eo@nebensachen.de>2015-01-29 01:20:00 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2015-01-29 01:20:00 +0000
commit9ee2d9f92a9097c468fb4e938a14b2f569feb453 (patch)
treecb338c7e115f4d0ec61dc04bb1d0830a6166325f
parentad588afdaa166bcdacbf9f746bd4d39b2c649768 (diff)
downloademacs-9ee2d9f92a9097c468fb4e938a14b2f569feb453.tar.gz
[Backport] lisp/gnus/nnimap.el (nnimap-find-expired-articles): nnimap `never' expiration fix
-rw-r--r--lisp/gnus/ChangeLog7
-rw-r--r--lisp/gnus/nnimap.el27
2 files changed, 20 insertions, 14 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2bdbfcc5c23..d0a68b7f0ce 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -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).
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 8ed5143b243..199cf4eb740 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -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