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

* Re: (expiry-wait . never) not properly handled by nnimap backend
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-28  5:30 UTC (permalink / raw)
  To: Elias Oltmanns; +Cc: ding

Elias Oltmanns <eo@nebensachen.de> writes:

> 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)?

Thanks; I've now applied your patch to the emacs-24 branch, so it should
eventually make its way onto the trunk and then the Gnus git tree.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: (expiry-wait . never) not properly handled by nnimap backend
  2015-01-28  5:30 ` Lars Ingebrigtsen
@ 2015-01-28 22:22   ` Katsumi Yamaoka
  2015-01-29  1:06     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2015-01-28 22:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Elias Oltmanns, ding

On Wed, 28 Jan 2015 16:30:26 +1100, Lars Ingebrigtsen wrote:
> Elias Oltmanns <eo@nebensachen.de> writes:
>> setting expiry-wait to never on nnimap groups does not work right now.
[...]
> Thanks; I've now applied your patch to the emacs-24 branch, so it should
> eventually make its way onto the trunk and then the Gnus git tree.

The patch is now in only the trunk.  Should it be backported?



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

* Re: (expiry-wait . never) not properly handled by nnimap backend
  2015-01-28 22:22   ` Katsumi Yamaoka
@ 2015-01-29  1:06     ` Lars Ingebrigtsen
  2015-01-29  1:44       ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-29  1:06 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: Elias Oltmanns, ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> On Wed, 28 Jan 2015 16:30:26 +1100, Lars Ingebrigtsen wrote:
>> Elias Oltmanns <eo@nebensachen.de> writes:
>>> setting expiry-wait to never on nnimap groups does not work right now.
> [...]
>> Thanks; I've now applied your patch to the emacs-24 branch, so it should
>> eventually make its way onto the trunk and then the Gnus git tree.
>
> The patch is now in only the trunk.  Should it be backported?

Yes, please.  I guess I put it in the wrong branch...  again...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: (expiry-wait . never) not properly handled by nnimap backend
  2015-01-29  1:06     ` Lars Ingebrigtsen
@ 2015-01-29  1:44       ` Katsumi Yamaoka
  0 siblings, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2015-01-29  1:44 UTC (permalink / raw)
  To: ding; +Cc: Elias Oltmanns

On Thu, 29 Jan 2015 12:06:21 +1100, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> The patch is now in only the trunk.  Should it be backported?

> Yes, please.  I guess I put it in the wrong branch...  again...

Ok.  Done.



^ 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).