diff options
| author | Michael Olson | 2009-01-03 23:05:42 +0000 |
|---|---|---|
| committer | Michael Olson | 2009-01-03 23:05:42 +0000 |
| commit | d549e52b93f71a0d0395367a06ed618a189e4522 (patch) | |
| tree | f18f0dd2ee391bf42a2fd65ab9ad0b264d13f96a | |
| parent | be3f421b7b6b02968f563dd602d78cdc50964986 (diff) | |
| download | emacs-d549e52b93f71a0d0395367a06ed618a189e4522.tar.gz emacs-d549e52b93f71a0d0395367a06ed618a189e4522.zip | |
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.
| -rw-r--r-- | lisp/gnus/nnimap.el | 9 | ||||
| -rw-r--r-- | lisp/net/imap.el | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index e0bb5ad48f2..a38d35444a3 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." | |||
| 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) |
| @@ -950,9 +950,10 @@ function is generally only called when Gnus is shutting down." | |||
| 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" |
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." | |||
| 2493 | (when (eq (char-after) ?\() | 2493 | (when (eq (char-after) ?\() |
| 2494 | (let (uid flags envelope internaldate rfc822 rfc822header rfc822text | 2494 | (let (uid flags envelope internaldate rfc822 rfc822header rfc822text |
| 2495 | rfc822size body bodydetail bodystructure flags-empty) | 2495 | rfc822size body bodydetail bodystructure flags-empty) |
| 2496 | (while (not (eq (char-after) ?\))) | 2496 | (while (let ((moved (skip-chars-forward " \t"))) |
| 2497 | (prog1 (not (eq (char-after) ?\))) | ||
| 2498 | (unless (= moved 0) (backward-char)))) | ||
| 2497 | (imap-forward) | 2499 | (imap-forward) |
| 2498 | (let ((token (read (current-buffer)))) | 2500 | (let ((token (read (current-buffer)))) |
| 2499 | (imap-forward) | 2501 | (imap-forward) |