(nnimap-open-connection): Allow anonymous login.
(nnimap-transform-headers): The chars header is called Chars not
Bytes.
+ (nnimap-wait-for-response): Don't infloop if the IMAP connection
+ drops.
* gnus-art.el (gnus-article-describe-briefly): Fix up typo in last
patch, found by Knut Anders Hatlen.
(match-string 0))))
(defun nnimap-wait-for-response (sequence &optional messagep)
- (goto-char (point-max))
- (while (not (re-search-backward (format "^%d .*\n" sequence)
- (max (point-min) (- (point) 500))
- t))
- (when messagep
- (message "Read %dKB" (/ (buffer-size) 1000)))
- (nnheader-accept-process-output (get-buffer-process (current-buffer)))
- (goto-char (point-max))))
+ (let ((process (get-buffer-process (current-buffer))))
+ (goto-char (point-max))
+ (while (and (memq (process-status process)
+ '(open run))
+ (not (re-search-backward (format "^%d .*\n" sequence)
+ (max (point-min) (- (point) 500))
+ t)))
+ (when messagep
+ (message "Read %dKB" (/ (buffer-size) 1000)))
+ (nnheader-accept-process-output process)
+ (goto-char (point-max)))))
(defun nnimap-parse-response ()
(let ((lines (split-string (nnimap-last-response-string) "\r\n" t))