* nnimap.el (nnimap-request-accept-article): Erase buffer before
appending for easier debugging.
+ (nnimap-wait-for-connection): Take a regexp.
+ (nnimap-request-accept-article): Wait for the continuation line before
+ sending anything unless we're streaming.
* gnus-art.el (gnus-treat-article): Only inhibit body washing, and
leave the header washing to take place.
(setq sequence (nnimap-send-command
"APPEND %S {%d}" (utf7-encode group t)
(length message)))
+ (unless nnimap-streaming
+ (nnimap-wait-for-connection "^[+]"))
(process-send-string (get-buffer-process (current-buffer)) message)
(process-send-string (get-buffer-process (current-buffer))
(if (nnimap-newlinep nnimap-object)
(nnimap-wait-for-response sequence)
(nnimap-parse-response))
-(defun nnimap-wait-for-connection ()
+(defun nnimap-wait-for-connection (regexp)
+ (unless regexp
+ (setq regexp "^[*.] .*\n"))
(let ((process (get-buffer-process (current-buffer))))
(goto-char (point-min))
(while (and (memq (process-status process)
'(open run))
- (not (re-search-forward "^[*.] .*\n" nil t)))
+ (not (re-search-forward regexp nil t)))
(nnheader-accept-process-output process)
(goto-char (point-min)))
(forward-line -1)