Gnus development mailing list
 help / color / mirror / Atom feed
From: Elias Oltmanns <eo@nebensachen.de>
To: ding@gnus.org
Subject: (expiry-wait . never) not properly handled by nnimap backend
Date: Sat, 31 May 2014 15:03:34 +0200	[thread overview]
Message-ID: <871tvat80p.fsf@denkblock.local> (raw)

[-- 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] 

             reply	other threads:[~2014-05-31 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-31 13:03 Elias Oltmanns [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tvat80p.fsf@denkblock.local \
    --to=eo@nebensachen.de \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).