This helps when the server sends more responses after we've gotten
everything we expected.
(nnimap-request-group): Don't make `M-g' bug out on group with no
marks.
(nnoo): Required, so that other packages can require nnimap.
+ (nnimap-wait-for-response): Be a bit more lax in finding the end of the
+ command we're looking for. This helps when the server sends more
+ responses after we've gotten everything we expected.
2010-09-18 Julien Danjou <julien@danjou.info>
(defun nnimap-wait-for-response (sequence &optional messagep)
(goto-char (point-max))
- (while (or (bobp)
- (progn
- (forward-line -1)
- (not (looking-at (format "^%d .*\n" sequence)))))
+ (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)))