Changes committed gnus/lisp (ChangeLog imap.el nnimap.el)
"Simon Josefsson" <[email protected]>
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog imap.el nnimap.el 2008-04-02 Simon Josefsson <[email protected]> * imap.el (imap-enable-exchange-bug-workaround): New variable. (imap-message-copyuid-1): Use it. (imap-message-appenduid-1): Likewise. Based on patch by Nathan J. Williams in <http://permalink.gmane.org/gmane.emacs.gnus.general/65855>. * nnimap.el (nnimap-enable-minmax-bug-workaround): Remove, replaced by imap-enable-exchange-bug-workaround. (nnimap-find-minmax-uid): Use imap-enable-exchange-bug-workaround. Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.1822 gnus/lisp/ChangeLog:7.1823 --- ChangeLog:7.1822 Tue Apr 1 16:48:18 2008 +++ ChangeLog Wed Apr 2 16:46:57 2008 @@ -1,3 +1,15 @@ +2008-04-02 Simon Josefsson <[email protected]> + + * imap.el (imap-enable-exchange-bug-workaround): New variable. + (imap-message-copyuid-1): Use it. + (imap-message-appenduid-1): Likewise. Based on patch by Nathan + J. Williams in + <http://permalink.gmane.org/gmane.emacs.gnus.general/65855>. + + * nnimap.el (nnimap-enable-minmax-bug-workaround): Remove, replaced by + imap-enable-exchange-bug-workaround. + (nnimap-find-minmax-uid): Use imap-enable-exchange-bug-workaround. + 2008-04-01 Simon Josefsson <[email protected]> * nnimap.el (nnimap-find-minmax-uid): Revert last fix, the "fix" turns Index: imap.el diff -u gnus/lisp/imap.el:7.44 gnus/lisp/imap.el:7.45 --- imap.el:7.44 Sun Mar 2 17:55:00 2008 +++ imap.el Wed Apr 2 16:46:57 2008 @@ -440,6 +440,12 @@ The function should take two arguments, the first the IMAP tag and the second the status (OK, NO, BAD etc) of the command.") +(defvar imap-enable-exchange-bug-workaround nil + "Send FETCH UID commands as *:* instead of *. +Enabling this appears to be required for some servers (e.g., +Microsoft Exchange) which otherwise would trigger a response 'BAD +The specified message set is invalid.'.") + ;; Utility functions: @@ -1774,7 +1780,8 @@ (imap-message-data (make-vector 2 0))) (when (imap-mailbox-examine-1 mailbox) (prog1 - (and (imap-fetch "*" "UID") + (and (imap-fetch + (if imap-enable-exchange-bug-workaround "*:*" "*") "UID") (list (imap-mailbox-get-1 'uidvalidity mailbox) (apply 'max (imap-message-map (lambda (uid prop) uid) 'UID)))) @@ -1818,7 +1825,8 @@ (imap-message-data (make-vector 2 0))) (when (imap-mailbox-examine-1 mailbox) (prog1 - (and (imap-fetch "*" "UID") + (and (imap-fetch + (if imap-enable-exchange-bug-workaround "*:*" "*") "UID") (list (imap-mailbox-get-1 'uidvalidity mailbox) (apply 'max (imap-message-map (lambda (uid prop) uid) 'UID)))) Index: nnimap.el diff -u gnus/lisp/nnimap.el:7.45 gnus/lisp/nnimap.el:7.46 --- nnimap.el:7.45 Tue Apr 1 16:48:18 2008 +++ nnimap.el Wed Apr 2 16:46:57 2008 @@ -219,19 +219,6 @@ ;; 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 @@ -568,7 +555,7 @@ (imap-mailbox-select group examine)) (let (minuid maxuid) (when (> (imap-mailbox-get 'exists) 0) - (imap-fetch (if nnimap-enable-minmax-bug-workaround "1:*" "1,*") + (imap-fetch (if imap-enable-exchange-bug-workaround "1,*:*" "1,*") "UID" nil 'nouidfetch) (imap-message-map (lambda (uid Uid) (setq minuid (if minuid (min minuid uid) uid)