From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/16609 Path: news.gmane.org!not-for-mail From: csanchezdll@gmail.com (Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama) Newsgroups: gmane.emacs.gnus.user Subject: Problem with expiry-wait set to never on imap Date: Thu, 19 Dec 2013 09:06:41 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1387444217 32683 80.91.229.3 (19 Dec 2013 09:10:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Dec 2013 09:10:17 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Thu Dec 19 10:10:23 2013 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VtZcc-0005X2-Qi for gegu-info-gnus-english@m.gmane.org; Thu, 19 Dec 2013 10:10:22 +0100 Original-Received: from localhost ([::1]:42867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtZcc-0000kH-Ag for gegu-info-gnus-english@m.gmane.org; Thu, 19 Dec 2013 04:10:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtZcT-0000a8-Nm for info-gnus-english@gnu.org; Thu, 19 Dec 2013 04:10:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtZcM-0000yF-EC for info-gnus-english@gnu.org; Thu, 19 Dec 2013 04:10:13 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:54532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtZcM-0000ud-7g for info-gnus-english@gnu.org; Thu, 19 Dec 2013 04:10:06 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VtZcJ-0005EH-N6 for info-gnus-english@gnu.org; Thu, 19 Dec 2013 10:10:03 +0100 Original-Received: from sdf.org ([192.94.73.15]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Dec 2013 10:10:03 +0100 Original-Received: from csanchezdll by sdf.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Dec 2013 10:10:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 56 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sdf.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Cancel-Lock: sha1:9Iuhbbq5vF1stVRSeG+uhDDke7k= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:16609 Archived-At: 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