Changes committed gnus/lisp (ChangeLog nnimap.el)
"Simon Josefsson" <[email protected]>
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog nnimap.el (nnimap-enable-minmax-bug-workaround): New variable to toggle whether to enable bug workaround or not. (nnimap-find-minmax-uid): Only enable workaround conditionally. Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.1821 gnus/lisp/ChangeLog:7.1822 --- ChangeLog:7.1821 Tue Apr 1 16:13:22 2008 +++ ChangeLog Tue Apr 1 16:48:18 2008 @@ -2,6 +2,9 @@ * nnimap.el (nnimap-find-minmax-uid): Revert last fix, the "fix" turns a 100 byte status-checks into a 2-3MB transfer for each group. + (nnimap-enable-minmax-bug-workaround): New variable to toggle whether + to enable bug workaround or not. + (nnimap-find-minmax-uid): Only enable workaround conditionally. 2008-03-29 Sven Joachim <[email protected]> Index: nnimap.el diff -u gnus/lisp/nnimap.el:7.44 gnus/lisp/nnimap.el:7.45 --- nnimap.el:7.44 Tue Apr 1 16:13:22 2008 +++ nnimap.el Tue Apr 1 16:48:18 2008 @@ -219,6 +219,19 @@ ;; Performance / bug workaround variables +(defcustom nnimap-enable-minmax-bug-workaround nil + "Send UID FETCH UID commands as 1:* instead of 1,*. +Enabling this appears to be required for some servers (e.g., +Exchange) which otherwise would trigger a response 'BAD The +specified message set is invalid.'. +Note that enabling this work around may cause significant +performance penalties if you have large mailboxes. It makes the +code transfer one line of data for each message in a +mailbox (i.e., O(n)) compared to transfering only two +lines (i.e., O(1))." + :type 'boolean + :group 'nnimap) + (defcustom nnimap-close-asynchronous t "Close mailboxes asynchronously in `nnimap-close-group'. This means that errors caught by nnimap when closing the mailbox will @@ -555,7 +568,8 @@ (imap-mailbox-select group examine)) (let (minuid maxuid) (when (> (imap-mailbox-get 'exists) 0) - (imap-fetch "1,*" "UID" nil 'nouidfetch) + (imap-fetch (if nnimap-enable-minmax-bug-workaround "1:*" "1,*") + "UID" nil 'nouidfetch) (imap-message-map (lambda (uid Uid) (setq minuid (if minuid (min minuid uid) uid) maxuid (if maxuid (max maxuid uid) uid)))