From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46598 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Internal error when doing expiry Date: Tue, 17 Sep 2002 21:44:43 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032291954 8034 127.0.0.1 (17 Sep 2002 19:45:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 17 Sep 2002 19:45:54 +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.35 #1 (Debian)) id 17rOID-00025Q-00 for ; Tue, 17 Sep 2002 21:45:53 +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 17rOHm-0003v5-00; Tue, 17 Sep 2002 14:45:26 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 17 Sep 2002 14:46:05 -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 OAA26399 for ; Tue, 17 Sep 2002 14:45:49 -0500 (CDT) Original-Received: (qmail 23888 invoked by alias); 17 Sep 2002 19:45:06 -0000 Original-Received: (qmail 23883 invoked from network); 17 Sep 2002 19:45:05 -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; 17 Sep 2002 19:45:05 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) by yxa.extundo.com (8.12.6/8.12.6) with ESMTP id g8HJiin2024313; Tue, 17 Sep 2002 21:44:45 +0200 Original-To: Niklas Morberg Mail-Copies-To: nobody X-Hashcash: 0:020917:niklas.morberg@axis.com:a5b387e48df69f27 X-Hashcash: 0:020917:ding@gnus.org:c2648eca5ce5b6f2 In-Reply-To: (Niklas Morberg's message of "Tue, 17 Sep 2002 16:08:59 +0200") Original-Lines: 97 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46598 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46598 Niklas Morberg writes: > When I try to expire in some of my nnimap groups, I get the > following message in the minibuffer (it does not end up in > the *Messages* buffer): > > error in process filter: Internal error, tag 3051 status BAD code nil text Protocol Error: "Invalid AND key in SEARCH command" > > Where does this message come from? I'm guessing the nnimap > backend. Oh. . Maybe this > information can help some more: > > 3050 UID SEARCH UID 1:8 NOT SINCE 10-Sep-2002 > * SEARCH > 3050 OK SEARCH completed. > 3051 UID SEARCH UID > 3051 BAD Protocol Error: "Invalid AND key in SEARCH command" > 3052 EXPUNGE > * 0 EXISTS > 3052 OK EXPUNGE completed. > > Does this matter at all? Should I be worried? This should be fixed by the patch in another thread: 2002-09-17 Simon Josefsson * nnimap.el (nnimap-expiry-target): Don't search for which articles exists here. (nnimap-request-expire-articles): Do it here instead. Only expire when articles are found. Suggested by Nevin Kapur . Index: nnimap.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnimap.el,v retrieving revision 6.39 diff -u -p -u -w -r6.39 nnimap.el --- nnimap.el 2002/09/11 08:13:03 6.39 +++ nnimap.el 2002/09/17 11:05:39 @@ -1298,10 +1298,7 @@ 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 (imap-search (concat "UID " - (imap-range-to-message-set - (gnus-uncompress-sequence arts))) - nnimap-server-buffer)) + (dolist (art arts) (nnimap-request-article art group server (current-buffer)) ;; hints for optimization in `nnimap-request-accept-article' (let ((nnimap-current-move-article art) @@ -1320,16 +1317,16 @@ function is generally only called when G (let ((days (or (and nnmail-expiry-wait-function (funcall nnmail-expiry-wait-function group)) nnmail-expiry-wait))) - (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) + (cond ((or force (eq days 'immediate)) + (let ((oldarts (imap-search + (concat "UID " + (imap-range-to-message-set artseq))))) + (when oldarts + (nnimap-expiry-target oldarts group server)) (when (imap-message-flags-add - (imap-range-to-message-set artseq) "\\Deleted") - (setq articles nil))) + (imap-range-to-message-set oldarts) "\\Deleted") + (setq articles (gnus-set-difference + articles oldarts))))) ((numberp days) (let ((oldarts (imap-search (format nnimap-expunge-search-string @@ -1337,12 +1334,10 @@ function is generally only called when G (nnimap-date-days-ago days)))) (imap-fetch-data-hook '(nnimap-request-expire-articles-progress))) - (nnimap-expiry-target oldarts group server) - (and oldarts - (imap-message-flags-add - (imap-range-to-message-set - (gnus-compress-sequence oldarts)) - "\\Deleted") + (when oldarts + (nnimap-expiry-target oldarts group server)) + (when (imap-message-flags-add + (imap-range-to-message-set oldarts) "\\Deleted") (setq articles (gnus-set-difference articles oldarts)))))))))) ;; return articles not deleted