+2010-09-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnimap.el (nnimap-request-group): Don't select the imap buffer before
+ opening the server.
+ (nnimap-request-delete-group): Implement group deletion.
+ (nnimap-transform-headers): Return the size of the entire message in
+ the Bytes header, not just the size of the first part.
+ (nnimap-request-move-article): When moving an article from nnimap,
+ request the article first so the accepting form has an article to
+ accept. Reported by Dan Christensen.
+ (nnimap-command): Make sure that the error message doesn't error out.
+
+2010-09-20 David Edmondson <dme@dme.org> (tiny change)
+
+ * nnimap.el (nnimap-request-set-mark): Don't wait for a response when
+ we haven't requested anything.
+
+2010-09-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnimap.el (nnimap-fetch-inbox): Use "[]" as the parameter instead of
+ "". Fix found by Andrew Cohen.
+
+ * mail-parse.el (mail-header-encode-parameter): Use -encode-parameter
+ instead of -encode-string.
+
2010-09-20 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-html.el (gnus-html-image-fetched): Pass arg to kill-buffer.
(defun nnimap-transform-headers ()
(goto-char (point-min))
- (let (article bytes lines)
+ (let (article bytes lines size)
(block nil
(while (not (eobp))
(while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)"))
bytes (nnimap-get-length)
lines nil)
(beginning-of-line)
+ (setq size
+ (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)"
+ (line-end-position)
+ t)
+ (match-string 1)))
+ (beginning-of-line)
(when (search-forward "BODYSTRUCTURE" (line-end-position) t)
(let ((structure (ignore-errors (read (current-buffer)))))
(while (and (consp structure)
(delete-region (line-beginning-position) (line-end-position))
(insert (format "211 %s Article retrieved." article))
(forward-line 1)
- (insert (format "Chars: %d\n" bytes))
+ (when size
+ (insert (format "Chars: %s\n" size)))
(when lines
(insert (format "Lines: %s\n" lines)))
(re-search-forward "^\r$")
(nreverse parts)))
(deffoo nnimap-request-group (group &optional server dont-check info)
- (with-current-buffer nntp-server-buffer
- (let ((result (nnimap-possibly-change-group group server))
- articles active marks high low)
+ (let ((result (nnimap-possibly-change-group group server))
+ articles active marks high low)
+ (with-current-buffer nntp-server-buffer
(when result
(if (and dont-check
(setq active (nth 2 (assoc group nnimap-current-infos))))
low high group))))
t)))
+(deffoo nnimap-request-delete-group (group &optional force server)
+ (when (nnimap-possibly-change-group nil server)
+ (with-current-buffer (nnimap-buffer)
+ (car (nnimap-command "DELETE %S" (utf7-encode group))))))
+
(defun nnimap-get-flags (spec)
(let ((articles nil)
elems)
(nnimap-find-article-by-message-id
internal-move-group message-id))))
(with-temp-buffer
- (let ((result (eval accept-form)))
- (when result
- (nnimap-delete-article article)
- result)))))))
+ (when (nnimap-request-article article group server (current-buffer))
+ (let ((result (eval accept-form)))
+ (when result
+ (nnimap-delete-article article)
+ result))))))))
(deffoo nnimap-request-expire-articles (articles group &optional server force)
(cond
(mapconcat #'identity flags " ")))))))
;; Wait for the last command to complete to avoid later
;; syncronisation problems with the stream.
- (nnimap-wait-for-response sequence)))))
+ (when sequence
+ (nnimap-wait-for-response sequence))))))
(deffoo nnimap-request-accept-article (group &optional server last)
(when (nnimap-possibly-change-group nil server)
(if (equal (caar response) "OK")
(cons t response)
(nnheader-report 'nnimap "%s"
- (mapconcat #'identity (car response) " "))
+ (mapconcat (lambda (a)
+ (format "%s" a))
+ (car response) " "))
nil)))
(defun nnimap-get-response (sequence)
"BODY.PEEK[HEADER] BODY.PEEK"
"RFC822.PEEK"))
(if nnimap-split-download-body-default
- ""
+ "[]"
"[1]")))
t))