aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-03-03 07:45:27 +0000
committerMiles Bader2006-03-03 07:45:27 +0000
commit719120eff4b070687d146d70133f5f73cc8fe5c4 (patch)
treef39509608eefa4eb9f11dfb4448b4e06fb33e45a
parentc99f622718a6bdb6dc5da9965e64ee998e8e16fb (diff)
downloademacs-719120eff4b070687d146d70133f5f73cc8fe5c4.tar.gz
emacs-719120eff4b070687d146d70133f5f73cc8fe5c4.zip
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-134
Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 43-48) - Munge arch explicit ids in etc/images to match Emacs - Update from CVS
-rw-r--r--lisp/gnus/ChangeLog53
-rw-r--r--lisp/gnus/dns.el2
-rw-r--r--lisp/gnus/gnus-draft.el2
-rw-r--r--lisp/gnus/gnus-int.el10
-rw-r--r--lisp/gnus/gnus-sum.el7
-rw-r--r--lisp/gnus/mm-decode.el18
-rw-r--r--lisp/gnus/mm-util.el10
-rw-r--r--lisp/gnus/mml.el10
-rw-r--r--lisp/gnus/nnweb.el118
9 files changed, 164 insertions, 66 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 003504b2f12..dce2a5ae07f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,56 @@
12006-03-03 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * mm-decode.el (mm-get-part): Don't use
4 mm-with-unibyte-current-buffer.
5
6 * gnus-sum.el (gnus-summary-set-display-table): Don't nix out
7 characters 160 through 255 in Emacs 23.
8
92006-03-02 Katsumi Yamaoka <yamaoka@jpl.org>
10
11 * mml.el (mml-generate-mime-1): Encode parts other than text/* or
12 message/* containing non-ASCII text properly.
13
142006-02-28 Katsumi Yamaoka <yamaoka@jpl.org>
15
16 * mm-util.el (mm-with-unibyte-current-buffer): Add note.
17
182006-02-28 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
19
20 * nnweb.el (nnweb-gmane-create-mapping): Don't choke on ^M.
21
222006-02-28 Reiner Steib <Reiner.Steib@gmx.de>
23
24 * nnweb.el (nnweb-type-definition, nnweb-gmane-search): Use new
25 nov.php.
26
272006-02-28 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de>
28
29 * nnweb.el (nnweb-type-definition, nnweb-gmane-create-mapping)
30 (nnweb-gmane-wash-article, nnweb-gmane-search): Fix Gmane web
31 groups. Kudos to Olly Betts <olly@survex.com> for providing NOV
32 output on the server side.
33 (nnweb-google-create-mapping): Update regexps and add some
34 progress indication.
35
362006-02-28 Reiner Steib <Reiner.Steib@gmx.de>
37
38 * message.el (message-user-fqdn): Remove useless * in doc string.
39
40 * gnus-draft.el (gnus-draft-send): Bind message-signature to avoid
41 unnecessary interaction when sending queued mails. Reported by
42 TAKAHASHI Yoshio <tkh@jp.fujitsu.com>.
43
442006-02-28 Lars Magne Ingebrigtsen <larsi@gnus.org>
45
46 * gnus-int.el (gnus-open-server): Respect gnus-batch-mode.
47 Merge of 2006-02-20 change from the trunk.
48
492006-02-28 Lars Magne Ingebrigtsen <larsi@gnus.org>
50
51 * dns.el (query-dns): Protect more against buggy tcp output.
52 Merge of 2006-02-20 change from the trunk.
53
12006-02-27 Reiner Steib <Reiner.Steib@gmx.de> 542006-02-27 Reiner Steib <Reiner.Steib@gmx.de>
2 55
3 * gnus-sum.el (gnus-sequence-of-unread-articles): Return nil if 56 * gnus-sum.el (gnus-sequence-of-unread-articles): Return nil if
diff --git a/lisp/gnus/dns.el b/lisp/gnus/dns.el
index d6c41ea823e..5069230e736 100644
--- a/lisp/gnus/dns.el
+++ b/lisp/gnus/dns.el
@@ -347,7 +347,7 @@ If FULLP, return the entire record returned."
347 (>= (buffer-size) 2)) 347 (>= (buffer-size) 2))
348 (goto-char (point-min)) 348 (goto-char (point-min))
349 (delete-region (point) (+ (point) 2))) 349 (delete-region (point) (+ (point) 2)))
350 (unless (zerop (buffer-size)) 350 (when (>= (buffer-size) 2)
351 (let ((result (dns-read (buffer-string)))) 351 (let ((result (dns-read (buffer-string))))
352 (if fullp 352 (if fullp
353 result 353 result
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index f9ff9d7122e..125e5bebd49 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -146,6 +146,8 @@
146 message-send-hook)) 146 message-send-hook))
147 (message-setup-hook (and (not is-queue) 147 (message-setup-hook (and (not is-queue)
148 message-setup-hook)) 148 message-setup-hook))
149 (message-signature (and (not is-queue)
150 message-signature))
149 (gnus-agent-queue-mail (and (not is-queue) 151 (gnus-agent-queue-mail (and (not is-queue)
150 gnus-agent-queue-mail)) 152 gnus-agent-queue-mail))
151 (rfc2047-encode-encoded-words nil) 153 (rfc2047-encode-encoded-words nil)
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index b59a3c1530b..8af0aa2cca2 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -250,10 +250,12 @@ If it is down, start it up (again)."
250 ;; recurse to open the agent's backend. 250 ;; recurse to open the agent's backend.
251 (setq open-offline (eq gnus-server-unopen-status 'offline)) 251 (setq open-offline (eq gnus-server-unopen-status 'offline))
252 gnus-server-unopen-status) 252 gnus-server-unopen-status)
253 ((gnus-y-or-n-p 253 ((and
254 (format "Unable to open %s:%s, go offline? " 254 (not gnus-batch-mode)
255 (car gnus-command-method) 255 (gnus-y-or-n-p
256 (cadr gnus-command-method))) 256 (format "Unable to open %s:%s, go offline? "
257 (car gnus-command-method)
258 (cadr gnus-command-method))))
257 (setq open-offline t) 259 (setq open-offline t)
258 'offline) 260 'offline)
259 (t 261 (t
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 70dabcd525b..226a9bd50f1 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3098,8 +3098,11 @@ display only a single character."
3098 (aset table ?\r nil) 3098 (aset table ?\r nil)
3099 ;; We keep TAB as well. 3099 ;; We keep TAB as well.
3100 (aset table ?\t nil) 3100 (aset table ?\t nil)
3101 ;; We nix out any glyphs over 126 that are not set already. 3101 ;; We nix out any glyphs 127 through 255, or 127 through 159 in
3102 (let ((i 256)) 3102 ;; Emacs 23, that are not set already.
3103 (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
3104 160
3105 256)))
3103 (while (>= (setq i (1- i)) 127) 3106 (while (>= (setq i (1- i)) 127)
3104 ;; Only modify if the entry is nil. 3107 ;; Only modify if the entry is nil.
3105 (unless (aref table i) 3108 (unless (aref table i)
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index fa77b7776f0..01557659fd6 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1084,14 +1084,16 @@ external if displayed external."
1084 1084
1085(defun mm-get-part (handle) 1085(defun mm-get-part (handle)
1086 "Return the contents of HANDLE as a string." 1086 "Return the contents of HANDLE as a string."
1087 (mm-with-unibyte-buffer 1087 (let ((default-enable-multibyte-characters
1088 (insert (with-current-buffer (mm-handle-buffer handle) 1088 (with-current-buffer (mm-handle-buffer handle)
1089 (mm-with-unibyte-current-buffer 1089 (mm-multibyte-p))))
1090 (buffer-string)))) 1090 (with-temp-buffer
1091 (mm-decode-content-transfer-encoding 1091 (insert-buffer-substring (mm-handle-buffer handle))
1092 (mm-handle-encoding handle) 1092 (mm-disable-multibyte)
1093 (mm-handle-media-type handle)) 1093 (mm-decode-content-transfer-encoding
1094 (buffer-string))) 1094 (mm-handle-encoding handle)
1095 (mm-handle-media-type handle))
1096 (buffer-string))))
1095 1097
1096(defun mm-insert-part (handle) 1098(defun mm-insert-part (handle)
1097 "Insert the contents of HANDLE in the current buffer." 1099 "Insert the contents of HANDLE in the current buffer."
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index a7f375aeba8..e4c87067872 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -796,11 +796,17 @@ Use multibyte mode for this."
796(defmacro mm-with-unibyte-current-buffer (&rest forms) 796(defmacro mm-with-unibyte-current-buffer (&rest forms)
797 "Evaluate FORMS with current buffer temporarily made unibyte. 797 "Evaluate FORMS with current buffer temporarily made unibyte.
798Also bind `default-enable-multibyte-characters' to nil. 798Also bind `default-enable-multibyte-characters' to nil.
799Equivalent to `progn' in XEmacs" 799Equivalent to `progn' in XEmacs
800
801NOTE: Use this macro with caution in multibyte buffers (it is not
802worth using this macro in unibyte buffers of course). Use of
803`(set-buffer-multibyte t)', which is run finally, is generally
804harmful since it is likely to modify existing data in the buffer.
805For instance, it converts \"\\300\\255\" into \"\\255\" in Emacs 23."
800 (let ((multibyte (make-symbol "multibyte")) 806 (let ((multibyte (make-symbol "multibyte"))
801 (buffer (make-symbol "buffer"))) 807 (buffer (make-symbol "buffer")))
802 `(if mm-emacs-mule 808 `(if mm-emacs-mule
803 (let ((,multibyte enable-multibyte-characters) 809 (let ((,multibyte enable-multibyte-characters)
804 (,buffer (current-buffer))) 810 (,buffer (current-buffer)))
805 (unwind-protect 811 (unwind-protect
806 (let (default-enable-multibyte-characters) 812 (let (default-enable-multibyte-characters)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 0ceda113f49..cf2f527c9d1 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -507,7 +507,15 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
507 (let ((coding-system-for-read mm-binary-coding-system)) 507 (let ((coding-system-for-read mm-binary-coding-system))
508 (mm-insert-file-contents filename nil nil nil nil t))) 508 (mm-insert-file-contents filename nil nil nil nil t)))
509 (t 509 (t
510 (insert (cdr (assq 'contents cont))))) 510 (let ((contents (cdr (assq 'contents cont))))
511 (if (if (featurep 'xemacs)
512 (string-match "[^\000-\377]" contents)
513 (mm-multibyte-string-p contents))
514 (progn
515 (mm-enable-multibyte)
516 (insert contents)
517 (setq charset (mm-encode-body)))
518 (insert contents)))))
511 (setq encoding (mm-encode-buffer type) 519 (setq encoding (mm-encode-buffer type)
512 coded (mm-string-as-multibyte (buffer-string)))) 520 coded (mm-string-as-multibyte (buffer-string))))
513 (mml-insert-mime-headers cont type charset encoding nil) 521 (mml-insert-mime-headers cont type charset encoding nil)
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index bf49aba7f08..13901e22f6d 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -27,9 +27,6 @@
27 27
28;; Note: You need to have `w3' installed for some functions to work. 28;; Note: You need to have `w3' installed for some functions to work.
29 29
30;; FIXME: Due to changes in the HTML output of Gmane, stuff related to Gmane
31;; web groups (`gnus-group-make-web-group') doesn't work anymore.
32
33;;; Code: 30;;; Code:
34 31
35(eval-when-compile (require 'cl)) 32(eval-when-compile (require 'cl))
@@ -82,7 +79,7 @@ Valid types include `google', `dejanews', and `gmane'.")
82 (reference . identity) 79 (reference . identity)
83 (map . nnweb-gmane-create-mapping) 80 (map . nnweb-gmane-create-mapping)
84 (search . nnweb-gmane-search) 81 (search . nnweb-gmane-search)
85 (address . "http://gmane.org/") 82 (address . "http://search.gmane.org/nov.php")
86 (identifier . nnweb-gmane-identity))) 83 (identifier . nnweb-gmane-identity)))
87 "Type-definition alist.") 84 "Type-definition alist.")
88 85
@@ -99,7 +96,7 @@ Valid types include `google', `dejanews', and `gmane'.")
99 96
100(defvoo nnweb-articles nil) 97(defvoo nnweb-articles nil)
101(defvoo nnweb-buffer nil) 98(defvoo nnweb-buffer nil)
102(defvar nnweb-group-alist nil) 99(defvoo nnweb-group-alist nil)
103(defvoo nnweb-group nil) 100(defvoo nnweb-group nil)
104(defvoo nnweb-hashtb nil) 101(defvoo nnweb-hashtb nil)
105 102
@@ -309,22 +306,26 @@ Valid types include `google', `dejanews', and `gmane'.")
309 306
310(defun nnweb-google-wash-article () 307(defun nnweb-google-wash-article ()
311 ;; We have Google's masked e-mail addresses here. :-/ 308 ;; We have Google's masked e-mail addresses here. :-/
312 (let ((case-fold-search t)) 309 (let ((case-fold-search t)
310 (start-re "<pre>\n *")
311 (end-re "\n *</pre>"))
313 (goto-char (point-min)) 312 (goto-char (point-min))
314 (if (save-excursion 313 (if (save-excursion
315 (or (re-search-forward "The requested message.*could not be found." 314 (or (re-search-forward "The requested message.*could not be found."
316 nil t) 315 nil t)
317 (not (and (re-search-forward "^<pre>" nil t) 316 (not (and (re-search-forward start-re nil t)
318 (re-search-forward "^</pre>" nil t))))) 317 (re-search-forward end-re nil t)))))
319 ;; FIXME: Don't know how to indicate "not found". 318 ;; FIXME: Don't know how to indicate "not found".
320 ;; Should this function throw an error? --rsteib 319 ;; Should this function throw an error? --rsteib
321 (progn 320 (progn
322 (gnus-message 3 "Requested article not found") 321 (gnus-message 3 "Requested article not found")
323 (erase-buffer)) 322 (erase-buffer))
324 (delete-region (point-min) 323 (delete-region (point-min)
325 (1+ (re-search-forward "^<pre>" nil t))) 324 (re-search-forward start-re))
326 (goto-char (point-min)) 325 (goto-char (point-min))
327 (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>")) 326 (delete-region (progn
327 (re-search-forward end-re)
328 (match-beginning 0))
328 (point-max)) 329 (point-max))
329 (mm-url-decode-entities)))) 330 (mm-url-decode-entities))))
330 331
@@ -403,6 +404,7 @@ Valid types include `google', `dejanews', and `gmane'.")
403 (save-excursion 404 (save-excursion
404 (set-buffer nnweb-buffer) 405 (set-buffer nnweb-buffer)
405 (erase-buffer) 406 (erase-buffer)
407 (nnheader-message 7 "Searching google...")
406 (when (funcall (nnweb-definition 'search) nnweb-search) 408 (when (funcall (nnweb-definition 'search) nnweb-search)
407 (let ((more t) 409 (let ((more t)
408 (i 0)) 410 (i 0))
@@ -413,15 +415,18 @@ Valid types include `google', `dejanews', and `gmane'.")
413 (goto-char (point-min)) 415 (goto-char (point-min))
414 (incf i 100) 416 (incf i 100)
415 (if (or (not (re-search-forward 417 (if (or (not (re-search-forward
416 "<td><a href=\"\n\\([^>\"]+\\)\"><img src=\"/img/nav_next" nil t)) 418 "<a href=\"\n\\([^>\"]+\\)\"><img src=\"[^\"]+next"
419 nil t))
417 (>= i nnweb-max-hits)) 420 (>= i nnweb-max-hits))
418 (setq more nil) 421 (setq more nil)
419 ;; Yup, there are more articles 422 ;; Yup, there are more articles
420 (setq more (concat (nnweb-definition 'base) (match-string 1))) 423 (setq more (concat (nnweb-definition 'base) (match-string 1)))
421 (when more 424 (when more
422 (erase-buffer) 425 (erase-buffer)
426 (nnheader-message 7 "Searching google...(%d)" i)
423 (mm-url-insert more)))) 427 (mm-url-insert more))))
424 ;; Return the articles in the right order. 428 ;; Return the articles in the right order.
429 (nnheader-message 7 "Searching google...done")
425 (setq nnweb-articles 430 (setq nnweb-articles
426 (sort nnweb-articles 'car-less-than-car)))))) 431 (sort nnweb-articles 'car-less-than-car))))))
427 432
@@ -454,46 +459,61 @@ Valid types include `google', `dejanews', and `gmane'.")
454 "Perform the search and create a number-to-url alist." 459 "Perform the search and create a number-to-url alist."
455 (save-excursion 460 (save-excursion
456 (set-buffer nnweb-buffer) 461 (set-buffer nnweb-buffer)
457 (erase-buffer) 462 (let ((case-fold-search t)
458 (when (funcall (nnweb-definition 'search) nnweb-search) 463 (active (or (cadr (assoc nnweb-group nnweb-group-alist))
459 (let ((more t) 464 (cons 1 0)))
460 (case-fold-search t) 465 map)
461 (active (or (cadr (assoc nnweb-group nnweb-group-alist)) 466 (erase-buffer)
462 (cons 1 0))) 467 (nnheader-message 7 "Searching Gmane..." )
463 subject group url 468 (when (funcall (nnweb-definition 'search) nnweb-search)
464 map)
465 ;; Remove stuff from the beginning of results
466 (goto-char (point-min))
467 (search-forward "Search Results</h1><ul>" nil t)
468 (delete-region (point-min) (point))
469 (goto-char (point-min)) 469 (goto-char (point-min))
470 ;; Iterate over the actual hits 470 ;; Skip the status line
471 (while (re-search-forward ".*href=\"\\([^\"]+\\)\">\\(.*\\)" nil t) 471 (forward-line 1)
472 (setq url (concat "http://gmane.org/" (match-string 1))) 472 ;; Thanks to Olly Betts we now have NOV lines in our buffer!
473 (setq subject (match-string 2)) 473 (while (not (eobp))
474 (unless (nnweb-get-hashtb url) 474 (unless (or (eolp) (looking-at "\x0d"))
475 (push 475 (let ((header (nnheader-parse-nov)))
476 (list 476 (let ((xref (mail-header-xref header))
477 (incf (cdr active)) 477 (from (mail-header-from header))
478 (make-full-mail-header 478 (subject (mail-header-subject header))
479 (cdr active) (concat "(" group ") " subject) nil nil 479 (rfc2047-encoding-type 'mime))
480 nil nil 0 0 url)) 480 (when (string-match " \\([^:]+\\):\\([0-9]+\\)" xref)
481 map) 481 (mail-header-set-xref
482 (nnweb-set-hashtb (cadar map) (car map)))) 482 header
483 ;; Return the articles in the right order. 483 (format "http://article.gmane.org/%s/%s/raw"
484 (setq nnweb-articles 484 (match-string 1 xref)
485 (sort (nconc nnweb-articles map) 'car-less-than-car)))))) 485 (match-string 2 xref))))
486
487 ;; Add host part to gmane-encrypted addresses
488 (when (string-match "@$" from)
489 (mail-header-set-from header
490 (concat from "public.gmane.org")))
491
492 (mail-header-set-subject header
493 (rfc2047-encode-string subject))
494
495 (unless (nnweb-get-hashtb (mail-header-xref header))
496 (push
497 (list
498 (incf (cdr active))
499 header)
500 map)
501 (nnweb-set-hashtb (cadar map) (car map))))))
502 (forward-line 1)))
503 (nnheader-message 7 "Searching Gmane...done")
504 (setq nnweb-articles
505 (sort (nconc nnweb-articles map) 'car-less-than-car)))))
486 506
487(defun nnweb-gmane-wash-article () 507(defun nnweb-gmane-wash-article ()
488 (let ((case-fold-search t)) 508 (let ((case-fold-search t))
489 (goto-char (point-min)) 509 (goto-char (point-min))
490 (re-search-forward "<!--X-Head-of-Message-->" nil t) 510 (when (search-forward "<!--X-Head-of-Message-->" nil t)
491 (delete-region (point-min) (point)) 511 (delete-region (point-min) (point))
492 (goto-char (point-min)) 512 (goto-char (point-min))
493 (while (looking-at "^<li><em>\\([^ ]+\\)</em>.*</li>") 513 (while (looking-at "^<li><em>\\([^ ]+\\)</em>.*</li>")
494 (replace-match "\\1\\2" t) 514 (replace-match "\\1\\2" t)
495 (forward-line 1)) 515 (forward-line 1))
496 (mm-url-remove-markup))) 516 (mm-url-remove-markup))))
497 517
498(defun nnweb-gmane-search (search) 518(defun nnweb-gmane-search (search)
499 (mm-url-insert 519 (mm-url-insert
@@ -501,11 +521,13 @@ Valid types include `google', `dejanews', and `gmane'.")
501 (nnweb-definition 'address) 521 (nnweb-definition 'address)
502 "?" 522 "?"
503 (mm-url-encode-www-form-urlencoded 523 (mm-url-encode-www-form-urlencoded
504 `(("query" . ,search))))) 524 `(("query" . ,search)
525 ("HITSPERPAGE" . ,(number-to-string nnweb-max-hits))))))
505 (setq buffer-file-name nil) 526 (setq buffer-file-name nil)
527 (set-buffer-multibyte t)
528 (mm-decode-coding-region (point-min) (point-max) 'utf-8)
506 t) 529 t)
507 530
508
509(defun nnweb-gmane-identity (url) 531(defun nnweb-gmane-identity (url)
510 "Return a unique identifier based on URL." 532 "Return a unique identifier based on URL."
511 (if (string-match "group=\\(.+\\)" url) 533 (if (string-match "group=\\(.+\\)" url)