#3218: <space> doesn't cycle through mailboxes -----------------------+---------------------------------------------------- Reporter: agriffis | Owner: mutt-dev Type: defect | Status: new Priority: major | Milestone: Component: mutt | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment(by agriffis): Here's the problem, in buffy.c: {{{ 539 count = 0; 540 while (count < 3) 541 { 542 if (mutt_strcmp (s, tmp->path) == 0) 543 count++; 544 else if (count && tmp->new) 545 break; 546 tmp = tmp->next; 547 if (!tmp) 548 { 549 tmp = Incoming; 550 count++; 551 } 552 } }}} Here's some debug output from the mutt_strcmp call: {{{ mutt_strcmp (s = "imaps://mail.griffis1.net/INBOX.clojure", tmp->path = "imaps://mail.griffis1.net/INBOX") mutt_strcmp (s = "imaps://mail.griffis1.net/INBOX.clojure", tmp->path = "imaps://mail.griffis1.net/INBOX/clojure") mutt_strcmp (s = "imaps://mail.griffis1.net/INBOX.clojure", tmp->path = "imaps://mail.griffis1.net/INBOX/mutt") ... }}} So s has been expanded by imap_expand_path() called from mutt_expand_path() but the mailboxes in the Incoming list haven't. The reason they haven't is that the Incoming list was constructed at mutt startup, so the IMAP separator for this connection hadn't been determined at that time. In fact, if I rebuild the Incoming list (with unmailboxes/mailboxes) after connecting to my imap servers, then *presto* everything works as expected. I think the best approach is to call mutt_expand_path() again while traversing the Incoming list in buffy.c. That allows the imap path to be expanded with the correct separator. Patch attached. -- Ticket URL: <http://dev.mutt.org/trac/ticket/3218#comment:2> Mutt <http://www.mutt.org/> The Mutt mail user agent