(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.
+ (nnimap): Add a `newlinep' field to keep track of end-of-line
+ conventions.
+ Don't send CRLF to things that don't want it.
+ (nnimap-request-accept-article): Ditto.
2010-09-18 Julien Danjou <julien@danjou.info>
"Internal variable with default value for `nnimap-split-download-body'.")
(defstruct nnimap
- group process commands capabilities select-result)
+ group process commands capabilities select-result newlinep)
(defvar nnimap-object nil)
(delete-process (nnimap-process nnimap-object))
(setq nnimap-object nil))))
(when nnimap-object
+ (when (eq nnimap-stream 'shell)
+ (setf (nnimap-newlinep nnimap-object) t))
(setf (nnimap-capabilities nnimap-object)
(mapcar
#'upcase
"APPEND %S {%d}" (utf7-encode group t)
(length message)))
(process-send-string (get-buffer-process (current-buffer)) message)
- (process-send-string (get-buffer-process (current-buffer)) "\r\n")
+ (process-send-string (get-buffer-process (current-buffer))
+ (if (nnimap-newlinep nnimap-object)
+ "\n"
+ "\r\n"))
(let ((result (nnimap-get-response sequence)))
(when result
(cons group
(process-send-string
(get-buffer-process (current-buffer))
(nnimap-log-command
- (format "%d %s\r\n"
+ (format "%d %s%s\n"
(incf nnimap-sequence)
- (apply #'format args))))
+ (apply #'format args)
+ (if (nnimap-newlinep nnimap-object)
+ ""
+ "\r"))))
nnimap-sequence)
(defun nnimap-log-command (command)