Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: Internal error when doing expiry
Date: Tue, 17 Sep 2002 21:44:43 +0200	[thread overview]
Message-ID: <iluelbs9z9w.fsf@latte.josefsson.org> (raw)
In-Reply-To: <u7khkemis.fsf@axis.com> (Niklas Morberg's message of "Tue, 17 Sep 2002 16:08:59 +0200")

Niklas Morberg <niklas.morberg@axis.com> 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. <checking the *imap-log* buffer>. 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  <jas@extundo.com>

	* 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
	<nevin@jhu.edu>.

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






      reply	other threads:[~2002-09-17 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-17 14:08 Niklas Morberg
2002-09-17 19:44 ` Simon Josefsson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iluelbs9z9w.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).