Mitigate access to messages on slow IMAP servers.
commit6d7b15cf9ff4025c2670e48c08f52e12a8b5928b
authorDavid Maus <dmaus@ictsoc.de>
Thu, 9 Sep 2010 12:16:22 +0000 (9 14:16 +0200)
committerDavid Maus <dmaus@ictsoc.de>
Thu, 9 Sep 2010 12:16:22 +0000 (9 14:16 +0200)
tree33cee3f37ba2e2207853e3bbd6e61bd9fee65411
parent87d0950f69902ec80f1f16f9790d08aa7140de02
Mitigate access to messages on slow IMAP servers.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file): New
customization variable.
(org-gnus-nnimap-cached-article-number): New function.
(org-gnus-follow-link): Try to fetch cached article number of
message-id.

Some IMAP servers (e.g. Courier) are slow when searching for a message
by its message id header field.  Because article numbers in IMAP
mailboxes are persistent UIDs, we can try to look up the UID of a IMAP
message in Gnus' cache for the mailbox in question and skip the slow
search on the server.

The problem with slow server was reported by Sébastien Vauban and the
patch is based on the work of Tassilo Horn.
lisp/org-gnus.el