From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54078 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: [nnimap] "UID SEARCH" on closed folder Date: Sat, 27 Sep 2003 18:50:42 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1064681543 32401 80.91.224.253 (27 Sep 2003 16:52:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2003 16:52:23 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M2619@lists.math.uh.edu Sat Sep 27 18:52:21 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A3IIv-0000qp-00 for ; Sat, 27 Sep 2003 18:52:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1A3IHW-0007Jm-00; Sat, 27 Sep 2003 11:50:54 -0500 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1A3IHO-0007Jg-00 for ding@lists.math.uh.edu; Sat, 27 Sep 2003 11:50:46 -0500 Original-Received: from yxa.extundo.com (178.230.13.217.in-addr.dgcsystems.net [217.13.230.178]) by justine.libertine.org (Postfix) with ESMTP id 3C7753A004B for ; Sat, 27 Sep 2003 11:50:45 -0500 (CDT) Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.10/8.12.10) with ESMTP id h8RGog1f016040 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL); Sat, 27 Sep 2003 18:50:43 +0200 Original-To: Linus Nordberg Mail-Copies-To: nobody X-Payment: hashcash 1.2 0:030927:linus@nordberg.se:0c50045e823591db X-Hashcash: 0:030927:linus@nordberg.se:0c50045e823591db X-Payment: hashcash 1.2 0:030927:ding@gnus.org:0403b3b7dc195566 X-Hashcash: 0:030927:ding@gnus.org:0403b3b7dc195566 In-Reply-To: (Linus Nordberg's message of "Sat, 27 Sep 2003 09:54:52 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54078 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54078 Linus Nordberg writes: > 17 STATUS "INBOX" (unseen) > * STATUS INBOX (UNSEEN 0) > 17 OK Completed > 18 EXPUNGE > 19 CLOSE > 20 UID SEARCH UNSEEN UNDELETED > * 4 EXISTS > * 0 RECENT > 18 OK Completed > 19 OK Completed > 20 BAD Please select a mailbox first > 21 SELECT "INBOX" There may be a race condition between imap-mailbox-close in asynchronous mode, and the code that send the UID SEARCH; the latter code first check if the requested mailbox was already selected, and then continue by sending the UID SEARCH command. If the CLOSE command was still pending when the code checked for the current mailbox, the UID SEARCH code might get the wrong idea that the mailbox is still selected. Try toggling `nnimap-close-asynchronous'. It should be possible to set a variable in the asynch imap-mailbox-close mode to let other code know that it is closing a mailbox, and add a check for that variable to `imap-mailbox-current', although that is left as an exercise.