aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-09-20 23:08:33 +0000
committerKatsumi Yamaoka2010-09-20 23:08:33 +0000
commita46359d4fb16b4cd512f86d5699c834834fa8cea (patch)
tree2934976f1df0a803e44011319d3d02549b0623f4
parent5d8e0d5d1444141bc4234232929f942d92c6d43b (diff)
downloademacs-a46359d4fb16b4cd512f86d5699c834834fa8cea.tar.gz
emacs-a46359d4fb16b4cd512f86d5699c834834fa8cea.zip
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.
-rw-r--r--doc/misc/gnus-news.texi16
-rw-r--r--lisp/gnus/ChangeLog25
-rw-r--r--lisp/gnus/mail-parse.el2
-rw-r--r--lisp/gnus/nnimap.el40
4 files changed, 70 insertions, 13 deletions
diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi
index e820ceae4a8..8aa28dd89c8 100644
--- a/doc/misc/gnus-news.texi
+++ b/doc/misc/gnus-news.texi
@@ -18,6 +18,17 @@
18 18
19@itemize @bullet 19@itemize @bullet
20 20
21@item Supported Emacs versions
22The following Emacs versions are supported by No Gnus:
23@itemize @bullet
24
25@item Emacs 22 and up
26@item XEmacs 21.4
27@item XEmacs 21.5
28@item SXEmacs
29
30@end itemize
31
21@item Installation changes 32@item Installation changes
22 33
23@itemize @bullet 34@itemize @bullet
@@ -55,6 +66,11 @@ remove-installed-shadows}.
55 66
56@itemize @bullet 67@itemize @bullet
57 68
69@item New version of @code{nnimap}
70
71@code{nnimap} has been reimplemented in a mostly-compatible way.
72@c Mention any incompatibilities.
73
58@item Gnus includes the Emacs Lisp @acronym{SASL} library. 74@item Gnus includes the Emacs Lisp @acronym{SASL} library.
59 75
60This provides a clean @acronym{API} to @acronym{SASL} mechanisms from 76This provides a clean @acronym{API} to @acronym{SASL} mechanisms from
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index bfccc8c5f6f..dd54343616b 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,28 @@
12010-09-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * nnimap.el (nnimap-request-group): Don't select the imap buffer before
4 opening the server.
5 (nnimap-request-delete-group): Implement group deletion.
6 (nnimap-transform-headers): Return the size of the entire message in
7 the Bytes header, not just the size of the first part.
8 (nnimap-request-move-article): When moving an article from nnimap,
9 request the article first so the accepting form has an article to
10 accept. Reported by Dan Christensen.
11 (nnimap-command): Make sure that the error message doesn't error out.
12
132010-09-20 David Edmondson <dme@dme.org> (tiny change)
14
15 * nnimap.el (nnimap-request-set-mark): Don't wait for a response when
16 we haven't requested anything.
17
182010-09-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
19
20 * nnimap.el (nnimap-fetch-inbox): Use "[]" as the parameter instead of
21 "". Fix found by Andrew Cohen.
22
23 * mail-parse.el (mail-header-encode-parameter): Use -encode-parameter
24 instead of -encode-string.
25
12010-09-20 Katsumi Yamaoka <yamaoka@jpl.org> 262010-09-20 Katsumi Yamaoka <yamaoka@jpl.org>
2 27
3 * gnus-html.el (gnus-html-image-fetched): Pass arg to kill-buffer. 28 * gnus-html.el (gnus-html-image-fetched): Pass arg to kill-buffer.
diff --git a/lisp/gnus/mail-parse.el b/lisp/gnus/mail-parse.el
index 169b70a266e..53094960e18 100644
--- a/lisp/gnus/mail-parse.el
+++ b/lisp/gnus/mail-parse.el
@@ -45,7 +45,7 @@
45(defalias 'mail-header-parse-content-type 'rfc2231-parse-qp-string) 45(defalias 'mail-header-parse-content-type 'rfc2231-parse-qp-string)
46(defalias 'mail-header-parse-content-disposition 'rfc2231-parse-qp-string) 46(defalias 'mail-header-parse-content-disposition 'rfc2231-parse-qp-string)
47(defalias 'mail-content-type-get 'rfc2231-get-value) 47(defalias 'mail-content-type-get 'rfc2231-get-value)
48(defalias 'mail-header-encode-parameter 'rfc2045-encode-string) 48(defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter)
49 49
50(defalias 'mail-header-remove-comments 'ietf-drums-remove-comments) 50(defalias 'mail-header-remove-comments 'ietf-drums-remove-comments)
51(defalias 'mail-header-remove-whitespace 'ietf-drums-remove-whitespace) 51(defalias 'mail-header-remove-whitespace 'ietf-drums-remove-whitespace)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index b3a9e5bcdc4..434ad01bc19 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -137,7 +137,7 @@ textual parts.")
137 137
138(defun nnimap-transform-headers () 138(defun nnimap-transform-headers ()
139 (goto-char (point-min)) 139 (goto-char (point-min))
140 (let (article bytes lines) 140 (let (article bytes lines size)
141 (block nil 141 (block nil
142 (while (not (eobp)) 142 (while (not (eobp))
143 (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)")) 143 (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)"))
@@ -148,6 +148,12 @@ textual parts.")
148 bytes (nnimap-get-length) 148 bytes (nnimap-get-length)
149 lines nil) 149 lines nil)
150 (beginning-of-line) 150 (beginning-of-line)
151 (setq size
152 (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)"
153 (line-end-position)
154 t)
155 (match-string 1)))
156 (beginning-of-line)
151 (when (search-forward "BODYSTRUCTURE" (line-end-position) t) 157 (when (search-forward "BODYSTRUCTURE" (line-end-position) t)
152 (let ((structure (ignore-errors (read (current-buffer))))) 158 (let ((structure (ignore-errors (read (current-buffer)))))
153 (while (and (consp structure) 159 (while (and (consp structure)
@@ -157,7 +163,8 @@ textual parts.")
157 (delete-region (line-beginning-position) (line-end-position)) 163 (delete-region (line-beginning-position) (line-end-position))
158 (insert (format "211 %s Article retrieved." article)) 164 (insert (format "211 %s Article retrieved." article))
159 (forward-line 1) 165 (forward-line 1)
160 (insert (format "Chars: %d\n" bytes)) 166 (when size
167 (insert (format "Chars: %s\n" size)))
161 (when lines 168 (when lines
162 (insert (format "Lines: %s\n" lines))) 169 (insert (format "Lines: %s\n" lines)))
163 (re-search-forward "^\r$") 170 (re-search-forward "^\r$")
@@ -384,9 +391,9 @@ textual parts.")
384 (nreverse parts))) 391 (nreverse parts)))
385 392
386(deffoo nnimap-request-group (group &optional server dont-check info) 393(deffoo nnimap-request-group (group &optional server dont-check info)
387 (with-current-buffer nntp-server-buffer 394 (let ((result (nnimap-possibly-change-group group server))
388 (let ((result (nnimap-possibly-change-group group server)) 395 articles active marks high low)
389 articles active marks high low) 396 (with-current-buffer nntp-server-buffer
390 (when result 397 (when result
391 (if (and dont-check 398 (if (and dont-check
392 (setq active (nth 2 (assoc group nnimap-current-infos)))) 399 (setq active (nth 2 (assoc group nnimap-current-infos))))
@@ -424,6 +431,11 @@ textual parts.")
424 low high group)))) 431 low high group))))
425 t))) 432 t)))
426 433
434(deffoo nnimap-request-delete-group (group &optional force server)
435 (when (nnimap-possibly-change-group nil server)
436 (with-current-buffer (nnimap-buffer)
437 (car (nnimap-command "DELETE %S" (utf7-encode group))))))
438
427(defun nnimap-get-flags (spec) 439(defun nnimap-get-flags (spec)
428 (let ((articles nil) 440 (let ((articles nil)
429 elems) 441 elems)
@@ -460,10 +472,11 @@ textual parts.")
460 (nnimap-find-article-by-message-id 472 (nnimap-find-article-by-message-id
461 internal-move-group message-id)))) 473 internal-move-group message-id))))
462 (with-temp-buffer 474 (with-temp-buffer
463 (let ((result (eval accept-form))) 475 (when (nnimap-request-article article group server (current-buffer))
464 (when result 476 (let ((result (eval accept-form)))
465 (nnimap-delete-article article) 477 (when result
466 result))))))) 478 (nnimap-delete-article article)
479 result))))))))
467 480
468(deffoo nnimap-request-expire-articles (articles group &optional server force) 481(deffoo nnimap-request-expire-articles (articles group &optional server force)
469 (cond 482 (cond
@@ -530,7 +543,8 @@ textual parts.")
530 (mapconcat #'identity flags " "))))))) 543 (mapconcat #'identity flags " ")))))))
531 ;; Wait for the last command to complete to avoid later 544 ;; Wait for the last command to complete to avoid later
532 ;; syncronisation problems with the stream. 545 ;; syncronisation problems with the stream.
533 (nnimap-wait-for-response sequence))))) 546 (when sequence
547 (nnimap-wait-for-response sequence))))))
534 548
535(deffoo nnimap-request-accept-article (group &optional server last) 549(deffoo nnimap-request-accept-article (group &optional server last)
536 (when (nnimap-possibly-change-group nil server) 550 (when (nnimap-possibly-change-group nil server)
@@ -863,7 +877,9 @@ textual parts.")
863 (if (equal (caar response) "OK") 877 (if (equal (caar response) "OK")
864 (cons t response) 878 (cons t response)
865 (nnheader-report 'nnimap "%s" 879 (nnheader-report 'nnimap "%s"
866 (mapconcat #'identity (car response) " ")) 880 (mapconcat (lambda (a)
881 (format "%s" a))
882 (car response) " "))
867 nil))) 883 nil)))
868 884
869(defun nnimap-get-response (sequence) 885(defun nnimap-get-response (sequence)
@@ -972,7 +988,7 @@ textual parts.")
972 "BODY.PEEK[HEADER] BODY.PEEK" 988 "BODY.PEEK[HEADER] BODY.PEEK"
973 "RFC822.PEEK")) 989 "RFC822.PEEK"))
974 (if nnimap-split-download-body-default 990 (if nnimap-split-download-body-default
975 "" 991 "[]"
976 "[1]"))) 992 "[1]")))
977 t)) 993 t))
978 994