summaryrefslogtreecommitdiff
path: root/lisp/net/imap.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2009-01-03 23:05:42 +0000
committerMichael Olson <mwolson@gnu.org>2009-01-03 23:05:42 +0000
commitd549e52b93f71a0d0395367a06ed618a189e4522 (patch)
treef18f0dd2ee391bf42a2fd65ab9ad0b264d13f96a /lisp/net/imap.el
parentbe3f421b7b6b02968f563dd602d78cdc50964986 (diff)
downloademacs-d549e52b93f71a0d0395367a06ed618a189e4522.tar.gz
Gnus: Fix edge cases with no data being returned and Courier eccentricity.
* lisp/gnus/nnimap.el (nnimap-retrieve-headers-progress): Handle edge case where `headers' is nil. This can occur if the IMAP server does not have permissions to read messages from a folder, but can write new messages to the folder. (nnimap-request-article-part): Do not insert `data' if it is nil. * lisp/net/imap.el (imap-parse-fetch): Courier can insert spurious blank characters which will confuse `read', so skip past them.
Diffstat (limited to 'lisp/net/imap.el')
-rw-r--r--lisp/net/imap.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index 6726bfda200..85afffc100b 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -2493,7 +2493,9 @@ Return nil if no complete line has arrived."
(when (eq (char-after) ?\()
(let (uid flags envelope internaldate rfc822 rfc822header rfc822text
rfc822size body bodydetail bodystructure flags-empty)
- (while (not (eq (char-after) ?\)))
+ (while (let ((moved (skip-chars-forward " \t")))
+ (prog1 (not (eq (char-after) ?\)))
+ (unless (= moved 0) (backward-char))))
(imap-forward)
(let ((token (read (current-buffer))))
(imap-forward)