Mercurial > emacs
changeset 110451:4b82113fd203
Merge changes made in Gnus trunk.
mail-parse.el (mail-header-encode-parameter): Use -encode-parameter instead of -encode-string.
nnimap.el (nnimap-fetch-inbox): Use "[]" as the parameter instead of "".
gnus-news.texi: Say what Emacs versions we support.
nnimap.el: Implement group deletion.
nnimap.el (nnimap-transform-headers): Return the size of the entire message in the Bytes header, not just the size of the first part.
gnus-news.texi: The nnimap makeover.
gnus-news.texi (Supported Emacs versions): Fix typo.
nnimap.el (nnimap-request-move-article): Fix article moving from nnimap to other servers.
nnimap.el (nnimap-request-set-mark): Don't wait for a response when we haven't requested anything.
nnimap.el (nnimap-command): Make sure that the error message doesn't error out.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 20 Sep 2010 23:08:33 +0000 |
parents | 9b627013b805 |
children | e047c298f019 |
files | doc/misc/gnus-news.texi lisp/gnus/ChangeLog lisp/gnus/mail-parse.el lisp/gnus/nnimap.el |
diffstat | 4 files changed, 70 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/misc/gnus-news.texi Tue Sep 21 00:42:47 2010 +0200 +++ b/doc/misc/gnus-news.texi Mon Sep 20 23:08:33 2010 +0000 @@ -18,6 +18,17 @@ @itemize @bullet +@item Supported Emacs versions +The following Emacs versions are supported by No Gnus: +@itemize @bullet + +@item Emacs 22 and up +@item XEmacs 21.4 +@item XEmacs 21.5 +@item SXEmacs + +@end itemize + @item Installation changes @itemize @bullet @@ -55,6 +66,11 @@ @itemize @bullet +@item New version of @code{nnimap} + +@code{nnimap} has been reimplemented in a mostly-compatible way. +@c Mention any incompatibilities. + @item Gnus includes the Emacs Lisp @acronym{SASL} library. This provides a clean @acronym{API} to @acronym{SASL} mechanisms from
--- a/lisp/gnus/ChangeLog Tue Sep 21 00:42:47 2010 +0200 +++ b/lisp/gnus/ChangeLog Mon Sep 20 23:08:33 2010 +0000 @@ -1,3 +1,28 @@ +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.
--- a/lisp/gnus/mail-parse.el Tue Sep 21 00:42:47 2010 +0200 +++ b/lisp/gnus/mail-parse.el Mon Sep 20 23:08:33 2010 +0000 @@ -45,7 +45,7 @@ (defalias 'mail-header-parse-content-type 'rfc2231-parse-qp-string) (defalias 'mail-header-parse-content-disposition 'rfc2231-parse-qp-string) (defalias 'mail-content-type-get 'rfc2231-get-value) -(defalias 'mail-header-encode-parameter 'rfc2045-encode-string) +(defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter) (defalias 'mail-header-remove-comments 'ietf-drums-remove-comments) (defalias 'mail-header-remove-whitespace 'ietf-drums-remove-whitespace)
--- a/lisp/gnus/nnimap.el Tue Sep 21 00:42:47 2010 +0200 +++ b/lisp/gnus/nnimap.el Mon Sep 20 23:08:33 2010 +0000 @@ -137,7 +137,7 @@ (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]+\\)")) @@ -148,6 +148,12 @@ 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) @@ -157,7 +163,8 @@ (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$") @@ -384,9 +391,9 @@ (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)))) @@ -424,6 +431,11 @@ 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) @@ -460,10 +472,11 @@ (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 @@ -530,7 +543,8 @@ (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) @@ -863,7 +877,9 @@ (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) @@ -972,7 +988,7 @@ "BODY.PEEK[HEADER] BODY.PEEK" "RFC822.PEEK")) (if nnimap-split-download-body-default - "" + "[]" "[1]"))) t))