* Problem with expiry-wait set to never on imap
@ 2013-12-19 9:06 Carlos Sánchez de La Lama
0 siblings, 0 replies; only message in thread
From: Carlos Sánchez de La Lama @ 2013-12-19 9:06 UTC (permalink / raw)
To: info-gnus-english
Hi all,
I have found a problem when setting expiry-wait to never for an imap
group. My messages were still being expired. After some investigation I
think the problem is at this defun:
--8<---------------cut here---------------start------------->8---
(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))))))))))
--8<---------------cut here---------------end--------------->8---
nnmail-expired-article-p will return nil for groups with expiry-wait
parameter set to never, but nnimap-find-expired-articles does not
checkfor such return value.
I have temporarily fixed it by placing in .gnus.el:
--8<---------------cut here---------------start------------->8---
(eval-after-load "nnimap"
'(defun nnimap-find-expired-articles (group)
(let ((cutoff (nnmail-expired-article-p group nil nil)))
(if 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))))))))))))
--8<---------------cut here---------------end--------------->8---
(note the check for cutoff being not-nil).
BR
Carlos
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-19 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-19 9:06 Problem with expiry-wait set to never on imap Carlos Sánchez de La Lama
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).