Gnus development mailing list
 help / color / mirror / Atom feed
* (expiry-wait . never) not properly handled by nnimap backend
@ 2014-05-31 13:03 Elias Oltmanns
  2015-01-28  5:30 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Elias Oltmanns @ 2014-05-31 13:03 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

Hi there,

setting expiry-wait to never on nnimap groups does not work right now.
Actually, I have observed and fixed this on Emacs 24.3.1 but the
revelant code looks much the same in Gnus master. The patch below has
been prepared against master but only been tested on Emacs 24.3.1. If
you agree with this fix, do I have to notify anyone in particular so
this will also be included in the next maintenance release of Emacs (if
there will be such a thing)?

Regards,

Elias



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1435 bytes --]

commit af6a2801a6270e475e093f50bc37145b63f602d9 (HEAD, refs/heads/master)
Author: Elias Oltmanns <eo@nebensachen.de>
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] 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-29  1:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-31 13:03 (expiry-wait . never) not properly handled by nnimap backend Elias Oltmanns
2015-01-28  5:30 ` Lars Ingebrigtsen
2015-01-28 22:22   ` Katsumi Yamaoka
2015-01-29  1:06     ` Lars Ingebrigtsen
2015-01-29  1:44       ` Katsumi Yamaoka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).