(nnimap-request-list): Servers may return \NoSelect case-insensitively.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 5 Sep 2010 16:24:11 +0000 (18:24 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 5 Sep 2010 16:24:11 +0000 (18:24 +0200)
lisp/ChangeLog
lisp/nnimap.el

index 50ef425..0fce221 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-request-list): Servers may return \NoSelect
+       case-insensitively.
+
        * imap.el (imap-fetch-safe): Removed function, and altered all callers
        to use `imap-fetch' instead.  According to the comments, this should be
        safe, since all other IMAP clients use the 1:* syntax.
index a26e011..63dcb9a 100644 (file)
@@ -1118,14 +1118,16 @@ function is generally only called when Gnus is shutting down."
       (dolist (pattern (nnimap-pattern-to-list-arguments nnimap-list-pattern))
        (dolist (mbx (funcall nnimap-request-list-method
                              (cdr pattern) (car pattern)))
-         (or (member "\\NoSelect" (imap-mailbox-get 'list-flags mbx))
-             (let* ((encoded-mbx (nnimap-encode-group-name mbx))
-                    (info (nnimap-find-minmax-uid encoded-mbx 'examine)))
-               (when info
-                 (with-current-buffer nntp-server-buffer
-                   (insert (format "\"%s\" %d %d y\n"
-                                   encoded-mbx (or (nth 2 info) 0)
-                                   (max 1 (or (nth 1 info) 1)))))))))))
+         (unless (member "\\noselect"
+                         (mapcar #'downcase
+                                 (imap-mailbox-get 'list-flags mbx)))
+           (let* ((encoded-mbx (nnimap-encode-group-name mbx))
+                  (info (nnimap-find-minmax-uid encoded-mbx 'examine)))
+             (when info
+               (with-current-buffer nntp-server-buffer
+                 (insert (format "\"%s\" %d %d y\n"
+                                 encoded-mbx (or (nth 2 info) 0)
+                                 (max 1 (or (nth 1 info) 1)))))))))))
     (gnus-message 5 "nnimap: Generating active list%s...done"
                  (if (> (length server) 0) (concat " for " server) ""))
     t))