Gnus development mailing list
 help / color / mirror / Atom feed
* [nnimap] "UID SEARCH" on closed folder
@ 2003-09-27  7:54 Linus Nordberg
  2003-09-27 16:50 ` Simon Josefsson
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Nordberg @ 2003-09-27  7:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

Gnus v5.10.2
GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars)
 of 2003-06-15 on fluff

I see this when speaking to a Cyrus IMAP4 v2.1.12 server.

--8<---------------cut here---------------start------------->8---
19 CLOSE
20 UID SEARCH UNSEEN UNDELETED
* 4 EXISTS
* 0 RECENT
18 OK Completed
19 OK Completed
--8<---------------cut here---------------end--------------->8---

See attached file for full log.

-- 
Linus


[-- Attachment #2: User settings --]
[-- Type: application/emacs-lisp, Size: 4477 bytes --]

[-- Attachment #3: cyrus-bug-1.txt --]
[-- Type: text/plain, Size: 2320 bytes --]

* OK b.swox.se Cyrus IMAP4 v2.1.12 server ready
1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE STARTTLS AUTH=PLAIN AUTH=DIGEST-MD5
1 OK Completed
2 LOGIN "<user>" "<pw>"
2 OK User logged in
3 SELECT "INBOX"
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save gnus-forward)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save gnus-forward \*)]  
* 4 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 977433818]  
* OK [UIDNEXT 385]  
3 OK [READ-WRITE] Completed
4 UID SEARCH UNSEEN UNDELETED
* SEARCH
4 OK Completed (0 msgs in 0.000 secs)
5 EXPUNGE
* 4 EXISTS
* 0 RECENT
5 OK Completed
6 CLOSE
6 OK Completed
7 SELECT "INBOX"
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save gnus-forward)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save gnus-forward \*)]  
* 4 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 977433818]  
* OK [UIDNEXT 385]  
7 OK [READ-WRITE] Completed
8 UID SEARCH UNSEEN UNDELETED
* SEARCH
8 OK Completed (0 msgs in 0.000 secs)
9 UID SEARCH SEEN
* SEARCH 221 262 331 369
9 OK Completed (4 msgs in 0.000 secs)
10 UID SEARCH FLAGGED
* SEARCH
10 OK Completed (0 msgs in 0.000 secs)
11 UID SEARCH ANSWERED
* SEARCH
11 OK Completed (0 msgs in 0.000 secs)
12 UID SEARCH KEYWORD gnus-expire
* SEARCH 369
12 OK Completed (1 msgs in 0.000 secs)
13 UID SEARCH KEYWORD gnus-save
* SEARCH
13 OK Completed (0 msgs in 0.000 secs)
14 UID SEARCH KEYWORD gnus-forward
* SEARCH
14 OK Completed (0 msgs in 0.000 secs)
15 UID SEARCH RECENT
* SEARCH
15 OK Completed (0 msgs in 0.000 secs)
16 FETCH 1,* UID
* 1 FETCH (UID 221)
* 4 FETCH (UID 369)
16 OK Completed
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"
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save gnus-forward)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save gnus-forward \*)]  
* 4 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 977433818]  
* OK [UIDNEXT 385]  
21 OK [READ-WRITE] Completed

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [nnimap] "UID SEARCH" on closed folder
  2003-09-27  7:54 [nnimap] "UID SEARCH" on closed folder Linus Nordberg
@ 2003-09-27 16:50 ` Simon Josefsson
  2003-09-29 15:06   ` Linus Nordberg
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Josefsson @ 2003-09-27 16:50 UTC (permalink / raw)
  Cc: ding

Linus Nordberg <linus@nordberg.se> 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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [nnimap] "UID SEARCH" on closed folder
  2003-09-27 16:50 ` Simon Josefsson
@ 2003-09-29 15:06   ` Linus Nordberg
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Nordberg @ 2003-09-29 15:06 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> wrote
Sat, 27 Sep 2003 18:50:42 +0200:

|  Try toggling `nnimap-close-asynchronous'.

That did indeed solve my problem.  Thanks.


|  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.

Ah, a well defined small task for the elisp newbie!  Thanks. :-)

-- 
Linus



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-29 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-27  7:54 [nnimap] "UID SEARCH" on closed folder Linus Nordberg
2003-09-27 16:50 ` Simon Josefsson
2003-09-29 15:06   ` Linus Nordberg

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).