From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45874 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap-request-expire-articles bug? (Was Re: nnimap, expiry-target, nnmail-fancy-expiry-targets) Date: Mon, 29 Jul 2002 13:58:32 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87sn2fiznh.fsf@hal.Olympus.INVALID> <87eldyajuu.fsf@hal.Olympus.INVALID> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027943933 30629 127.0.0.1 (29 Jul 2002 11:58:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2002 11:58:53 +0000 (UTC) Cc: ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Z9Ap-0007xt-00 for ; Mon, 29 Jul 2002 13:58:52 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17Z9Aq-0005Yd-00; Mon, 29 Jul 2002 06:58:52 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 29 Jul 2002 06:59:18 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id GAA03730 for ; Mon, 29 Jul 2002 06:59:06 -0500 (CDT) Original-Received: (qmail 9751 invoked by alias); 29 Jul 2002 11:58:34 -0000 Original-Received: (qmail 9746 invoked from network); 29 Jul 2002 11:58:34 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by gnus.org with SMTP; 29 Jul 2002 11:58:34 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.5/8.12.5) with ESMTP id g6TBwWkd012219; Mon, 29 Jul 2002 13:58:32 +0200 Original-To: "Davide G. M. Salvetti" Mail-Copies-To: nobody X-Hashcash: 020729:salve@icube.it:f1a602f1534e7ba7 X-Hashcash: 020729:ding@gnus.org:11e2d3c9216385af In-Reply-To: (Simon Josefsson's message of "Mon, 29 Jul 2002 13:47:59 +0200") Original-Lines: 58 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45874 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45874 Simon Josefsson writes: > Yup. Does this work? Not likely, try this instead. Still untested, but should at least evaluate. Index: nnimap.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnimap.el,v retrieving revision 6.37 diff -u -p -u -w -r6.37 nnimap.el --- nnimap.el 2002/07/10 16:28:39 6.37 +++ nnimap.el 2002/07/29 12:14:39 @@ -1296,7 +1296,10 @@ function is generally only called when G (defun nnimap-expiry-target (arts group server) (unless (eq nnmail-expiry-target 'delete) (with-temp-buffer - (dolist (art (gnus-uncompress-sequence arts)) + (dolist (art (imap-search (concat "UID " + (imap-range-to-message-set + (gnus-uncompress-sequence arts))) + nnimap-server-buffer)) (nnimap-request-article art group server (current-buffer)) ;; hints for optimization in `nnimap-request-accept-article' (let ((nnimap-current-move-article art) @@ -1312,16 +1315,15 @@ function is generally only called when G (let ((artseq (gnus-compress-sequence articles))) (when (and artseq (nnimap-possibly-change-group group server)) (with-current-buffer nnimap-server-buffer - (if force - (progn - (nnimap-expiry-target artseq group server) - (when (imap-message-flags-add (imap-range-to-message-set artseq) - "\\Deleted") - (setq articles nil))) (let ((days (or (and nnmail-expiry-wait-function (funcall nnmail-expiry-wait-function group)) nnmail-expiry-wait))) - (cond ((eq days 'immediate) + (cond (force + (nnimap-expiry-target artseq group server) + (when (imap-message-flags-add + (imap-range-to-message-set artseq) "\\Deleted") + (setq articles nil))) + ((eq days 'immediate) (nnimap-expiry-target artseq group server) (when (imap-message-flags-add (imap-range-to-message-set artseq) "\\Deleted") @@ -1340,7 +1342,7 @@ function is generally only called when G (gnus-compress-sequence oldarts)) "\\Deleted") (setq articles (gnus-set-difference - articles oldarts))))))))))) + articles oldarts)))))))))) ;; return articles not deleted articles)