aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2007-11-19 05:50:39 +0000
committerMiles Bader2007-11-19 05:50:39 +0000
commit1428d46be965cc483bf9cd55185c86cfc67d4b8d (patch)
tree8b93f344df5e95de9688e6f60d315fe17eae7bfc
parent282e1e37cb1100b5549fe987ef1882e9be670375 (diff)
downloademacs-1428d46be965cc483bf9cd55185c86cfc67d4b8d.tar.gz
emacs-1428d46be965cc483bf9cd55185c86cfc67d4b8d.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-933
-rw-r--r--etc/GNUS-NEWS6
-rw-r--r--lisp/gnus/ChangeLog35
-rw-r--r--lisp/gnus/gnus-msg.el2
-rw-r--r--lisp/gnus/gnus-start.el11
-rw-r--r--lisp/gnus/nnmail.el3
-rw-r--r--lisp/gnus/nnml.el9
-rw-r--r--lisp/gnus/nntp.el45
-rw-r--r--lisp/gnus/pop3.el25
8 files changed, 106 insertions, 30 deletions
diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS
index 585f62087d0..f7817bafb6a 100644
--- a/etc/GNUS-NEWS
+++ b/etc/GNUS-NEWS
@@ -58,7 +58,7 @@ Articles::.
58 58
59** International host names (IDNA) can now be decoded inside article bodies 59** International host names (IDNA) can now be decoded inside article bodies
60using `W i' (`gnus-summary-idna-message'). This requires that GNU Libidn 60using `W i' (`gnus-summary-idna-message'). This requires that GNU Libidn
61(`http://www.gnu.org/software/libidn/') has been installed. 61(<http://www.gnu.org/software/libidn/>) has been installed.
62 62
63** The non-ASCII group names handling has been much improved. The back 63** The non-ASCII group names handling has been much improved. The back
64ends that fully support non-ASCII group names are now `nntp', `nnml', 64ends that fully support non-ASCII group names are now `nntp', `nnml',
@@ -106,7 +106,7 @@ From Newsgroups::.
106 106
107** You can replace MIME parts with external bodies. See 107** You can replace MIME parts with external bodies. See
108`gnus-mime-replace-part' and `gnus-article-replace-part'. *Note MIME 108`gnus-mime-replace-part' and `gnus-article-replace-part'. *Note MIME
109Commands::, *note Using MIME::. 109Commands::, *Note Using MIME::.
110 110
111** The option `mm-fill-flowed' can be used to disable treatment of 111** The option `mm-fill-flowed' can be used to disable treatment of
112format=flowed messages. Also, flowed text is disabled when sending 112format=flowed messages. Also, flowed text is disabled when sending
@@ -146,7 +146,7 @@ Variables.
146** The option `message-citation-line-format' controls the format of the 146** The option `message-citation-line-format' controls the format of the
147"Whomever writes:" line. You need to set 147"Whomever writes:" line. You need to set
148`message-citation-line-function' to 148`message-citation-line-function' to
149`message-insert-formated-citation-line' as well. 149`message-insert-formatted-citation-line' as well.
150 150
151 151
152* Changes in back ends 152* Changes in back ends
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 9b9f026f27b..212c0711169 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -88,6 +88,41 @@
88 * gnus-demon.el (gnus-demon): 88 * gnus-demon.el (gnus-demon):
89 * gnus-uu.el (gnus-uu-default-view-rules): Fix typos in docstrings. 89 * gnus-uu.el (gnus-uu-default-view-rules): Fix typos in docstrings.
90 90
912007-11-15 Katsumi Yamaoka <yamaoka@jpl.org>
92
93 * nntp.el (nntp-insert-buffer-substring, nntp-copy-to-buffer): New
94 macros.
95 (nntp-wait-for, nntp-retrieve-articles, nntp-async-trigger)
96 (nntp-retrieve-headers-with-xover): Use nntp-insert-buffer-substring to
97 copy data from unibyte buffer to multibyte current buffer.
98 (nntp-retrieve-headers, nntp-retrieve-groups); Use nntp-copy-to-buffer
99 to copy data from unibyte current buffer to multibyte buffer.
100 (nntp-make-process-buffer): Make process buffer unibyte.
101
102 * pop3.el (pop3-open-server): Fix typo in Lisp code.
103
1042007-11-14 Denys Duchier <denys.duchier@univ-orleans.fr> (tiny change)
105
106 * pop3.el (pop3-open-server): Accept and process data more robustly at
107 connexion start to avoid spurious "POP SSL connexion failed" errors.
108
1092007-11-14 Katsumi Yamaoka <yamaoka@jpl.org>
110
111 * gnus-start.el (gnus-active-to-gnus-format): Use unibyte buffer to
112 read group names.
113
1142007-11-12 Reiner Steib <Reiner.Steib@gmx.de>
115
116 * gnus-msg.el (gnus-confirm-mail-reply-to-news): Adjust :version.
117
1182007-11-12 Katsumi Yamaoka <yamaoka@jpl.org>
119
120 * nnmail.el (nnmail-parse-active): Make group names unibyte.
121 (nnmail-save-active): Use a unibyte buffer when saving active file,
122 which may contain non-ASCII group names.
123
124 * nnml.el (nnml-request-group): Decode group names in messages.
125
912007-11-05 Reiner Steib <Reiner.Steib@gmx.de> 1262007-11-05 Reiner Steib <Reiner.Steib@gmx.de>
92 127
93 * message.el (message-citation-line-function) 128 * message.el (message-citation-line-function)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 891ed1bc269..f5bf3a7ef65 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -265,7 +265,7 @@ This can also be a function receiving the group name as the only
265parameter, which should return non-nil if a confirmation is needed; or 265parameter, which should return non-nil if a confirmation is needed; or
266a regexp, in which case a confirmation is asked for if the group name 266a regexp, in which case a confirmation is asked for if the group name
267matches the regexp." 267matches the regexp."
268 :version "22.1" 268 :version "23.0" ;; No Gnus (default changed)
269 :group 'gnus-message 269 :group 'gnus-message
270 :type '(choice (const :tag "No" nil) 270 :type '(choice (const :tag "No" nil)
271 (const :tag "Yes" t) 271 (const :tag "Yes" t)
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index e58187548b6..98994d5aaf7 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2103,7 +2103,8 @@ If SCAN, request a scan of that group as well."
2103 (if (equal method gnus-select-method) 2103 (if (equal method gnus-select-method)
2104 (gnus-make-hashtable 2104 (gnus-make-hashtable
2105 (count-lines (point-min) (point-max))) 2105 (count-lines (point-min) (point-max)))
2106 (gnus-make-hashtable 4096))))))) 2106 (gnus-make-hashtable 4096))))))
2107 group max min)
2107 ;; Delete unnecessary lines. 2108 ;; Delete unnecessary lines.
2108 (goto-char (point-min)) 2109 (goto-char (point-min))
2109 (cond 2110 (cond
@@ -2138,8 +2139,12 @@ If SCAN, request a scan of that group as well."
2138 (insert prefix) 2139 (insert prefix)
2139 (zerop (forward-line 1))))))) 2140 (zerop (forward-line 1)))))))
2140 ;; Store the active file in a hash table. 2141 ;; Store the active file in a hash table.
2141 (goto-char (point-min)) 2142 ;; Use a unibyte buffer in order to make `read' read non-ASCII
2142 (let (group max min) 2143 ;; group names (which have been encoded) as unibyte strings.
2144 (mm-with-unibyte-buffer
2145 (insert-buffer-substring cur)
2146 (setq cur (current-buffer))
2147 (goto-char (point-min))
2143 (while (not (eobp)) 2148 (while (not (eobp))
2144 (condition-case () 2149 (condition-case ()
2145 (progn 2150 (progn
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 7608660f019..8ff6d1d1459 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -693,7 +693,7 @@ nn*-request-list should have been called before calling this function."
693 (setq group (symbol-name group))) 693 (setq group (symbol-name group)))
694 (if (and (numberp (setq max (read buffer))) 694 (if (and (numberp (setq max (read buffer)))
695 (numberp (setq min (read buffer)))) 695 (numberp (setq min (read buffer))))
696 (push (list group (cons min max)) 696 (push (list (mm-string-as-unibyte group) (cons min max))
697 group-assoc))) 697 group-assoc)))
698 (error nil)) 698 (error nil))
699 (widen) 699 (widen)
@@ -708,6 +708,7 @@ nn*-request-list should have been called before calling this function."
708 (let ((coding-system-for-write nnmail-active-file-coding-system)) 708 (let ((coding-system-for-write nnmail-active-file-coding-system))
709 (when file-name 709 (when file-name
710 (with-temp-file file-name 710 (with-temp-file file-name
711 (mm-disable-multibyte)
711 (nnmail-generate-active group-assoc))))) 712 (nnmail-generate-active group-assoc)))))
712 713
713(defun nnmail-generate-active (alist) 714(defun nnmail-generate-active (alist)
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index f4836364181..8a5afbe5b60 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -258,7 +258,8 @@ non-nil.")
258 (string-to-number (file-name-nondirectory path))))))) 258 (string-to-number (file-name-nondirectory path)))))))
259 259
260(deffoo nnml-request-group (group &optional server dont-check) 260(deffoo nnml-request-group (group &optional server dont-check)
261 (let ((file-name-coding-system nnmail-pathname-coding-system)) 261 (let ((file-name-coding-system nnmail-pathname-coding-system)
262 (decoded (nnml-decoded-group-name group server)))
262 (cond 263 (cond
263 ((not (nnml-possibly-change-directory group server)) 264 ((not (nnml-possibly-change-directory group server))
264 (nnheader-report 'nnml "Invalid group (no such directory)")) 265 (nnheader-report 'nnml "Invalid group (no such directory)"))
@@ -268,15 +269,15 @@ non-nil.")
268 ((not (file-directory-p nnml-current-directory)) 269 ((not (file-directory-p nnml-current-directory))
269 (nnheader-report 'nnml "%s is not a directory" nnml-current-directory)) 270 (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
270 (dont-check 271 (dont-check
271 (nnheader-report 'nnml "Group %s selected" group) 272 (nnheader-report 'nnml "Group %s selected" decoded)
272 t) 273 t)
273 (t 274 (t
274 (nnheader-re-read-dir nnml-current-directory) 275 (nnheader-re-read-dir nnml-current-directory)
275 (nnmail-activate 'nnml) 276 (nnmail-activate 'nnml)
276 (let ((active (nth 1 (assoc group nnml-group-alist)))) 277 (let ((active (nth 1 (assoc group nnml-group-alist))))
277 (if (not active) 278 (if (not active)
278 (nnheader-report 'nnml "No such group: %s" group) 279 (nnheader-report 'nnml "No such group: %s" decoded)
279 (nnheader-report 'nnml "Selected group %s" group) 280 (nnheader-report 'nnml "Selected group %s" decoded)
280 (nnheader-insert "211 %d %d %d %s\n" 281 (nnheader-insert "211 %d %d %d %s\n"
281 (max (1+ (- (cdr active) (car active))) 0) 282 (max (1+ (- (cdr active) (car active))) 0)
282 (car active) (cdr active) group))))))) 283 (car active) (cdr active) group)))))))
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index c8c14da4df7..356ffefddeb 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -364,6 +364,32 @@ be restored and the command retried."
364 364
365 (throw 'nntp-with-open-group-error t)) 365 (throw 'nntp-with-open-group-error t))
366 366
367(defmacro nntp-insert-buffer-substring (buffer &optional start end)
368 "Copy string from unibyte buffer to multibyte current buffer."
369 (if (featurep 'xemacs)
370 `(insert-buffer-substring ,buffer ,start ,end)
371 `(if enable-multibyte-characters
372 (insert (with-current-buffer ,buffer
373 (mm-string-to-multibyte
374 ,(if (or start end)
375 `(buffer-substring (or ,start (point-min))
376 (or ,end (point-max)))
377 '(buffer-string)))))
378 (insert-buffer-substring ,buffer ,start ,end))))
379
380(defmacro nntp-copy-to-buffer (buffer start end)
381 "Copy string from unibyte current buffer to multibyte buffer."
382 (if (featurep 'xemacs)
383 `(copy-to-buffer ,buffer ,start ,end)
384 `(let ((string (buffer-substring ,start ,end)))
385 (with-current-buffer ,buffer
386 (erase-buffer)
387 (insert (if enable-multibyte-characters
388 (mm-string-to-multibyte string)
389 string))
390 (goto-char (point-min))
391 nil))))
392
367(defsubst nntp-wait-for (process wait-for buffer &optional decode discard) 393(defsubst nntp-wait-for (process wait-for buffer &optional decode discard)
368 "Wait for WAIT-FOR to arrive from PROCESS." 394 "Wait for WAIT-FOR to arrive from PROCESS."
369 395
@@ -409,7 +435,7 @@ be restored and the command retried."
409 (save-excursion 435 (save-excursion
410 (set-buffer buffer) 436 (set-buffer buffer)
411 (goto-char (point-max)) 437 (goto-char (point-max))
412 (insert-buffer-substring (process-buffer process)) 438 (nntp-insert-buffer-substring (process-buffer process))
413 ;; Nix out "nntp reading...." message. 439 ;; Nix out "nntp reading...." message.
414 (when nntp-have-messaged 440 (when nntp-have-messaged
415 (setq nntp-have-messaged nil) 441 (setq nntp-have-messaged nil)
@@ -653,7 +679,7 @@ command whose response triggered the error."
653 nntp-server-buffer)) 679 nntp-server-buffer))
654 (buffer (and process 680 (buffer (and process
655 (process-buffer process)))) 681 (process-buffer process))))
656 ;; When I an able to identify the 682 ;; When I am able to identify the
657 ;; connection to the server AND I've 683 ;; connection to the server AND I've
658 ;; received NO reponse for 684 ;; received NO reponse for
659 ;; nntp-connection-timeout seconds. 685 ;; nntp-connection-timeout seconds.
@@ -738,7 +764,7 @@ command whose response triggered the error."
738 (nnheader-fold-continuation-lines) 764 (nnheader-fold-continuation-lines)
739 ;; Remove all "\r"'s. 765 ;; Remove all "\r"'s.
740 (nnheader-strip-cr) 766 (nnheader-strip-cr)
741 (copy-to-buffer nntp-server-buffer (point-min) (point-max)) 767 (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
742 'headers))))) 768 'headers)))))
743 769
744(deffoo nntp-retrieve-groups (groups &optional server) 770(deffoo nntp-retrieve-groups (groups &optional server)
@@ -820,7 +846,8 @@ command whose response triggered the error."
820 846
821 (if (not nntp-server-list-active-group) 847 (if (not nntp-server-list-active-group)
822 (progn 848 (progn
823 (copy-to-buffer nntp-server-buffer (point-min) (point-max)) 849 (nntp-copy-to-buffer nntp-server-buffer
850 (point-min) (point-max))
824 'group) 851 'group)
825 ;; We have read active entries, so we just delete the 852 ;; We have read active entries, so we just delete the
826 ;; superfluous gunk. 853 ;; superfluous gunk.
@@ -828,7 +855,7 @@ command whose response triggered the error."
828 (while (re-search-forward "^[.2-5]" nil t) 855 (while (re-search-forward "^[.2-5]" nil t)
829 (delete-region (match-beginning 0) 856 (delete-region (match-beginning 0)
830 (progn (forward-line 1) (point)))) 857 (progn (forward-line 1) (point))))
831 (copy-to-buffer nntp-server-buffer (point-min) (point-max)) 858 (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
832 'active))))))) 859 'active)))))))
833 860
834(deffoo nntp-retrieve-articles (articles &optional group server) 861(deffoo nntp-retrieve-articles (articles &optional group server)
@@ -893,7 +920,7 @@ command whose response triggered the error."
893 (narrow-to-region 920 (narrow-to-region
894 (setq point (goto-char (point-max))) 921 (setq point (goto-char (point-max)))
895 (progn 922 (progn
896 (insert-buffer-substring buf last-point (cdr entry)) 923 (nntp-insert-buffer-substring buf last-point (cdr entry))
897 (point-max))) 924 (point-max)))
898 (setq last-point (cdr entry)) 925 (setq last-point (cdr entry))
899 (nntp-decode-text) 926 (nntp-decode-text)
@@ -1206,7 +1233,7 @@ password contained in '~/.nntp-authinfo'."
1206 (format " *server %s %s %s*" 1233 (format " *server %s %s %s*"
1207 nntp-address nntp-port-number 1234 nntp-address nntp-port-number
1208 (gnus-buffer-exists-p buffer)))) 1235 (gnus-buffer-exists-p buffer))))
1209 (mm-enable-multibyte) 1236 (mm-disable-multibyte)
1210 (set (make-local-variable 'after-change-functions) nil) 1237 (set (make-local-variable 'after-change-functions) nil)
1211 (set (make-local-variable 'nntp-process-wait-for) nil) 1238 (set (make-local-variable 'nntp-process-wait-for) nil)
1212 (set (make-local-variable 'nntp-process-callback) nil) 1239 (set (make-local-variable 'nntp-process-callback) nil)
@@ -1390,7 +1417,7 @@ password contained in '~/.nntp-authinfo'."
1390 (goto-char (point-max)) 1417 (goto-char (point-max))
1391 (save-restriction 1418 (save-restriction
1392 (narrow-to-region (point) (point)) 1419 (narrow-to-region (point) (point))
1393 (insert-buffer-substring buf start) 1420 (nntp-insert-buffer-substring buf start)
1394 (when decode 1421 (when decode
1395 (nntp-decode-text)))))) 1422 (nntp-decode-text))))))
1396 ;; report it. 1423 ;; report it.
@@ -1619,7 +1646,7 @@ password contained in '~/.nntp-authinfo'."
1619 (when in-process-buffer-p 1646 (when in-process-buffer-p
1620 (set-buffer buf) 1647 (set-buffer buf)
1621 (goto-char (point-max)) 1648 (goto-char (point-max))
1622 (insert-buffer-substring process-buffer) 1649 (nntp-insert-buffer-substring process-buffer)
1623 (set-buffer process-buffer) 1650 (set-buffer process-buffer)
1624 (erase-buffer) 1651 (erase-buffer)
1625 (set-buffer buf)) 1652 (set-buffer buf))
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 595d0c2ff64..d152c2480ad 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -242,16 +242,23 @@ Returns the process associated with the connection."
242 mailhost port))) 242 mailhost port)))
243 (when process 243 (when process
244 ;; There's a load of info printed that needs deleting. 244 ;; There's a load of info printed that needs deleting.
245 (while (when (memq (process-status process) '(open run)) 245 (let ((again 't))
246 (pop3-accept-process-output process) 246 ;; repeat until
247 (goto-char (point-max)) 247 ;; - either we received the +OK line
248 (forward-line -1) 248 ;; - or accept-process-output timed out without getting
249 (if (looking-at "\\+OK") 249 ;; anything
250 (progn 250 (while (and again
251 (delete-region (point-min) (point)) 251 (setq again (memq (process-status process)
252 nil) 252 '(open run))))
253 (setq again (pop3-accept-process-output process))
254 (goto-char (point-max))
255 (forward-line -1)
256 (cond ((looking-at "\\+OK")
257 (setq again nil)
258 (delete-region (point-min) (point)))
259 ((not again)
253 (pop3-quit process) 260 (pop3-quit process)
254 (error "POP SSL connexion failed")))) 261 (error "POP SSL connexion failed")))))
255 process))) 262 process)))
256 ((eq pop3-stream-type 'starttls) 263 ((eq pop3-stream-type 'starttls)
257 ;; gnutls-cli, openssl don't accept service names 264 ;; gnutls-cli, openssl don't accept service names