aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus
diff options
context:
space:
mode:
authorMichael Olson <[email protected]>2009-01-03 23:05:42 +0000
committerMichael Olson <[email protected]>2009-01-03 23:05:42 +0000
commitd549e52b93f71a0d0395367a06ed618a189e4522 (patch)
treef18f0dd2ee391bf42a2fd65ab9ad0b264d13f96a /lisp/gnus
parentbe3f421b7b6b02968f563dd602d78cdc50964986 (diff)
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/gnus')
-rw-r--r--lisp/gnus/nnimap.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index e0bb5ad48f..a38d35444a 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -620,7 +620,7 @@ If EXAMINE is non-nil the group is selected read-only."
;; to make it more clear.
(mm-with-unibyte-buffer
(buffer-disable-undo)
- (insert headers)
+ (when headers (insert headers))
(let ((head (nnheader-parse-naked-head uid)))
(mail-header-set-number head uid)
(mail-header-set-chars head chars)
@@ -950,9 +950,10 @@ function is generally only called when Gnus is shutting down."
(erase-buffer)
(let ((data (imap-fetch article part prop nil
nnimap-server-buffer)))
- (insert (nnimap-demule (if detail
- (nth 2 (car data))
- data))))
+ (when data
+ (insert (nnimap-demule (if detail
+ (nth 2 (car data))
+ data)))))
(nnheader-ms-strip-cr)
(gnus-message
10 "nnimap: Fetching (part of) article %d from %s...done"