comparison lisp/gnus/nnimap.el @ 100871:1d5b4a08955f

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.
author Michael Olson <mwolson@gnu.org>
date Sat, 03 Jan 2009 23:05:42 +0000
parents d0077257129f
children 8698a8bb7d0e
comparison
equal deleted inserted replaced
100870:373ba628faa9 100871:1d5b4a08955f
618 (nnheader-insert-nov 618 (nnheader-insert-nov
619 ;; At this stage, we only have bytes, so let's use unibyte buffers 619 ;; At this stage, we only have bytes, so let's use unibyte buffers
620 ;; to make it more clear. 620 ;; to make it more clear.
621 (mm-with-unibyte-buffer 621 (mm-with-unibyte-buffer
622 (buffer-disable-undo) 622 (buffer-disable-undo)
623 (insert headers) 623 (when headers (insert headers))
624 (let ((head (nnheader-parse-naked-head uid))) 624 (let ((head (nnheader-parse-naked-head uid)))
625 (mail-header-set-number head uid) 625 (mail-header-set-number head uid)
626 (mail-header-set-chars head chars) 626 (mail-header-set-chars head chars)
627 (mail-header-set-lines head lines) 627 (mail-header-set-lines head lines)
628 (mail-header-set-xref 628 (mail-header-set-xref
948 (if (not nnheader-callback-function) 948 (if (not nnheader-callback-function)
949 (with-current-buffer (or to-buffer nntp-server-buffer) 949 (with-current-buffer (or to-buffer nntp-server-buffer)
950 (erase-buffer) 950 (erase-buffer)
951 (let ((data (imap-fetch article part prop nil 951 (let ((data (imap-fetch article part prop nil
952 nnimap-server-buffer))) 952 nnimap-server-buffer)))
953 (insert (nnimap-demule (if detail 953 (when data
954 (nth 2 (car data)) 954 (insert (nnimap-demule (if detail
955 data)))) 955 (nth 2 (car data))
956 data)))))
956 (nnheader-ms-strip-cr) 957 (nnheader-ms-strip-cr)
957 (gnus-message 958 (gnus-message
958 10 "nnimap: Fetching (part of) article %d from %s...done" 959 10 "nnimap: Fetching (part of) article %d from %s...done"
959 article (or group imap-current-mailbox gnus-newsgroup-name)) 960 article (or group imap-current-mailbox gnus-newsgroup-name))
960 (if (bobp) 961 (if (bobp)