diff options
| author | Miles Bader | 2006-02-01 10:02:36 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-02-01 10:02:36 +0000 |
| commit | 46e8fe3d6ce114ae3ecd41f7add9ed7f0c13f4b6 (patch) | |
| tree | 4ecbbd335f2c98e1b5dc98da479196a563aebb89 | |
| parent | 06e7028b76c83c5fba3b1e581ae5b68cd7bcc177 (diff) | |
| download | emacs-46e8fe3d6ce114ae3ecd41f7add9ed7f0c13f4b6.tar.gz emacs-46e8fe3d6ce114ae3ecd41f7add9ed7f0c13f4b6.zip | |
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 8-13)
- Merge from emacs--devo--0
- Update from CVS
| -rw-r--r-- | lisp/gnus/ChangeLog | 54 | ||||
| -rw-r--r-- | lisp/gnus/mailcap.el | 51 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 23 | ||||
| -rw-r--r-- | lisp/gnus/mm-uu.el | 58 | ||||
| -rw-r--r-- | lisp/gnus/nnweb.el | 100 | ||||
| -rw-r--r-- | man/ChangeLog | 6 | ||||
| -rw-r--r-- | man/message.texi | 21 |
7 files changed, 207 insertions, 106 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index cd98afa3da5..87a3f1918d6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,8 +1,60 @@ | |||
| 1 | 2006-01-31 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de> | ||
| 2 | |||
| 3 | * nnweb.el (nnweb-group-alist): Use defvar instead of defvoo, | ||
| 4 | there's only one active file for all servers. | ||
| 5 | (nnweb-request-scan): Make sure nnweb-articles is initialized on | ||
| 6 | solid groups. Gnus might have used a FAST request to select the | ||
| 7 | group. | ||
| 8 | (nnweb-request-group, nnweb-google-parse-1): Don't keep nnweb-type | ||
| 9 | and nnweb-search redundantly in the active file. | ||
| 10 | (nnweb-request-list): Don't list bogus groups. There can only be | ||
| 11 | one. | ||
| 12 | (nnweb-request-create-group): Don't use ARGS. | ||
| 13 | (nnweb-possibly-change-server, nnweb-request-group): Remove some | ||
| 14 | initialisations. Let nnoo do the work. | ||
| 15 | |||
| 16 | 2006-01-31 Romain Francoise <romain@orebokech.com> | ||
| 17 | |||
| 18 | * message.el (message-alternative-emails): Improve docstring. | ||
| 19 | (message-setup-1): Call `message-use-alternative-email-as-from' | ||
| 20 | after `message-setup-hook' to give it precedence over posting | ||
| 21 | styles, etc. | ||
| 22 | (message-use-alternative-email-as-from): Add docstring. Remove | ||
| 23 | the original From header if present. | ||
| 24 | |||
| 25 | 2006-01-31 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 26 | |||
| 27 | * mm-uu.el (mm-uu-emacs-sources-extract): Say the part has been | ||
| 28 | decoded. | ||
| 29 | (mm-uu-diff-extract): Ditto. | ||
| 30 | |||
| 31 | 2006-01-31 Kevin Ryde <user42@zip.com.au> | ||
| 32 | |||
| 33 | * mailcap.el (mailcap-viewer-passes-test): Don't put "(nil t)" into | ||
| 34 | mailcap-viewer-test-cache when there's no 'test clause, since that | ||
| 35 | will invert the meaning of a "nil" test previously determined by | ||
| 36 | mailcap-mailcap-entry-passes-test. | ||
| 37 | |||
| 38 | 2006-01-30 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 39 | |||
| 40 | * nnweb.el (nnweb-google-parse-1): Clarify some comments. | ||
| 41 | |||
| 42 | 2006-01-30 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de> | ||
| 43 | |||
| 44 | * nnweb.el (nnweb-type-definition, nnweb-google-parse-1) | ||
| 45 | (nnweb-google-create-mapping, nnweb-google-search): Adapt to | ||
| 46 | current Google Groups. | ||
| 47 | |||
| 48 | 2006-01-26 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 49 | |||
| 50 | * Makefile.in (clean): New rule. | ||
| 51 | (distclean): Use it. | ||
| 52 | |||
| 1 | 2006-01-25 Katsumi Yamaoka <yamaoka@jpl.org> | 53 | 2006-01-25 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 54 | ||
| 3 | * mm-uu.el (mm-uu-dissect-text-parts): Ignore it if a given part | 55 | * mm-uu.el (mm-uu-dissect-text-parts): Ignore it if a given part |
| 4 | is dissected into a single part of which the type is the same as | 56 | is dissected into a single part of which the type is the same as |
| 5 | the given one. | 57 | the given one; decode charset. |
| 6 | 58 | ||
| 7 | 2006-01-21 Kevin Ryde <user42@zip.com.au> | 59 | 2006-01-21 Kevin Ryde <user42@zip.com.au> |
| 8 | 60 | ||
diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 80153645819..f0d93f38655 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; mailcap.el --- MIME media types configuration | 1 | ;;; mailcap.el --- MIME media types configuration |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | ;; 2005 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: William M. Perry <wmperry@aventail.com> | 6 | ;; Author: William M. Perry <wmperry@aventail.com> |
| 7 | ;; Lars Magne Ingebrigtsen <larsi@gnus.org> | 7 | ;; Lars Magne Ingebrigtsen <larsi@gnus.org> |
| @@ -640,30 +640,31 @@ to supply to the test." | |||
| 640 | (viewer (cdr (assoc 'viewer viewer-info))) | 640 | (viewer (cdr (assoc 'viewer viewer-info))) |
| 641 | (default-directory (expand-file-name "~/")) | 641 | (default-directory (expand-file-name "~/")) |
| 642 | status parsed-test cache result) | 642 | status parsed-test cache result) |
| 643 | (if (setq cache (assoc test mailcap-viewer-test-cache)) | 643 | (cond ((setq cache (assoc test mailcap-viewer-test-cache)) |
| 644 | (cadr cache) | 644 | (cadr cache)) |
| 645 | (setq | 645 | ((not test-info) t) ; No test clause |
| 646 | result | 646 | (t |
| 647 | (cond | 647 | (setq |
| 648 | ((not test-info) t) ; No test clause | 648 | result |
| 649 | ((not test) nil) ; Already failed test | 649 | (cond |
| 650 | ((eq test t) t) ; Already passed test | 650 | ((not test) nil) ; Already failed test |
| 651 | ((functionp test) ; Lisp function as test | 651 | ((eq test t) t) ; Already passed test |
| 652 | (funcall test type-info)) | 652 | ((functionp test) ; Lisp function as test |
| 653 | ((and (symbolp test) ; Lisp variable as test | 653 | (funcall test type-info)) |
| 654 | (boundp test)) | 654 | ((and (symbolp test) ; Lisp variable as test |
| 655 | (symbol-value test)) | 655 | (boundp test)) |
| 656 | ((and (listp test) ; List to be eval'd | 656 | (symbol-value test)) |
| 657 | (symbolp (car test))) | 657 | ((and (listp test) ; List to be eval'd |
| 658 | (eval test)) | 658 | (symbolp (car test))) |
| 659 | (t | 659 | (eval test)) |
| 660 | (setq test (mailcap-unescape-mime-test test type-info) | 660 | (t |
| 661 | test (list shell-file-name nil nil nil | 661 | (setq test (mailcap-unescape-mime-test test type-info) |
| 662 | shell-command-switch test) | 662 | test (list shell-file-name nil nil nil |
| 663 | status (apply 'call-process test)) | 663 | shell-command-switch test) |
| 664 | (eq 0 status)))) | 664 | status (apply 'call-process test)) |
| 665 | (push (list otest result) mailcap-viewer-test-cache) | 665 | (eq 0 status)))) |
| 666 | result))) | 666 | (push (list otest result) mailcap-viewer-test-cache) |
| 667 | result)))) | ||
| 667 | 668 | ||
| 668 | (defun mailcap-add-mailcap-entry (major minor info) | 669 | (defun mailcap-add-mailcap-entry (major minor info) |
| 669 | (let ((old-major (assoc major mailcap-mime-data))) | 670 | (let ((old-major (assoc major mailcap-mime-data))) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 797d2233fe5..28325b73e26 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -1388,8 +1388,13 @@ should be sent in several parts. If it is nil, the size is unlimited." | |||
| 1388 | (integer 1000000))) | 1388 | (integer 1000000))) |
| 1389 | 1389 | ||
| 1390 | (defcustom message-alternative-emails nil | 1390 | (defcustom message-alternative-emails nil |
| 1391 | "A regexp to match the alternative email addresses. | 1391 | "*Regexp matching alternative email addresses. |
| 1392 | The first matched address (not primary one) is used in the From field." | 1392 | The first address in the To, Cc or From headers of the original |
| 1393 | article matching this variable is used as the From field of | ||
| 1394 | outgoing messages. | ||
| 1395 | |||
| 1396 | This variable has precedence over posting styles and anything that runs | ||
| 1397 | off `message-setup-hook'." | ||
| 1393 | :group 'message-headers | 1398 | :group 'message-headers |
| 1394 | :link '(custom-manual "(message)Message Headers") | 1399 | :link '(custom-manual "(message)Message Headers") |
| 1395 | :type '(choice (const :tag "Always use primary" nil) | 1400 | :type '(choice (const :tag "Always use primary" nil) |
| @@ -5546,10 +5551,6 @@ are not included." | |||
| 5546 | (when message-default-mail-headers | 5551 | (when message-default-mail-headers |
| 5547 | (insert message-default-mail-headers) | 5552 | (insert message-default-mail-headers) |
| 5548 | (or (bolp) (insert ?\n))) | 5553 | (or (bolp) (insert ?\n))) |
| 5549 | (save-restriction | ||
| 5550 | (message-narrow-to-headers) | ||
| 5551 | (if message-alternative-emails | ||
| 5552 | (message-use-alternative-email-as-from))) | ||
| 5553 | (when message-generate-headers-first | 5554 | (when message-generate-headers-first |
| 5554 | (message-generate-headers | 5555 | (message-generate-headers |
| 5555 | (message-headers-to-generate | 5556 | (message-headers-to-generate |
| @@ -5565,6 +5566,12 @@ are not included." | |||
| 5565 | (set-buffer-modified-p nil) | 5566 | (set-buffer-modified-p nil) |
| 5566 | (setq buffer-undo-list nil) | 5567 | (setq buffer-undo-list nil) |
| 5567 | (run-hooks 'message-setup-hook) | 5568 | (run-hooks 'message-setup-hook) |
| 5569 | ;; Do this last to give it precedence over posting styles, etc. | ||
| 5570 | (when (message-mail-p) | ||
| 5571 | (save-restriction | ||
| 5572 | (message-narrow-to-headers) | ||
| 5573 | (if message-alternative-emails | ||
| 5574 | (message-use-alternative-email-as-from)))) | ||
| 5568 | (message-position-point) | 5575 | (message-position-point) |
| 5569 | (undo-boundary)) | 5576 | (undo-boundary)) |
| 5570 | 5577 | ||
| @@ -6848,6 +6855,9 @@ regexp VARSTR." | |||
| 6848 | (read-string prompt initial-contents)))) | 6855 | (read-string prompt initial-contents)))) |
| 6849 | 6856 | ||
| 6850 | (defun message-use-alternative-email-as-from () | 6857 | (defun message-use-alternative-email-as-from () |
| 6858 | "Set From field of the outgoing message to the first matching | ||
| 6859 | address in `message-alternative-emails', looking at To, Cc and | ||
| 6860 | From headers in the original article." | ||
| 6851 | (require 'mail-utils) | 6861 | (require 'mail-utils) |
| 6852 | (let* ((fields '("To" "Cc")) | 6862 | (let* ((fields '("To" "Cc")) |
| 6853 | (emails | 6863 | (emails |
| @@ -6862,6 +6872,7 @@ regexp VARSTR." | |||
| 6862 | emails nil)) | 6872 | emails nil)) |
| 6863 | (pop emails)) | 6873 | (pop emails)) |
| 6864 | (unless (or (not email) (equal email user-mail-address)) | 6874 | (unless (or (not email) (equal email user-mail-address)) |
| 6875 | (message-remove-header "From") | ||
| 6865 | (goto-char (point-max)) | 6876 | (goto-char (point-max)) |
| 6866 | (insert "From: " email "\n")))) | 6877 | (insert "From: " email "\n")))) |
| 6867 | 6878 | ||
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index fa36582af01..eb5afa794f5 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el | |||
| @@ -266,7 +266,7 @@ Return that buffer." | |||
| 266 | 266 | ||
| 267 | (defun mm-uu-emacs-sources-extract () | 267 | (defun mm-uu-emacs-sources-extract () |
| 268 | (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) | 268 | (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) |
| 269 | '("application/emacs-lisp") | 269 | '("application/emacs-lisp" (charset . gnus-decoded)) |
| 270 | nil nil | 270 | nil nil |
| 271 | (list mm-dissect-disposition | 271 | (list mm-dissect-disposition |
| 272 | (cons 'filename file-name)))) | 272 | (cons 'filename file-name)))) |
| @@ -282,7 +282,7 @@ Return that buffer." | |||
| 282 | 282 | ||
| 283 | (defun mm-uu-diff-extract () | 283 | (defun mm-uu-diff-extract () |
| 284 | (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) | 284 | (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) |
| 285 | '("text/x-patch"))) | 285 | '("text/x-patch" (charset . gnus-decoded)))) |
| 286 | 286 | ||
| 287 | (defun mm-uu-diff-test () | 287 | (defun mm-uu-diff-test () |
| 288 | (and gnus-newsgroup-name | 288 | (and gnus-newsgroup-name |
| @@ -509,31 +509,53 @@ value of `mm-uu-text-plain-type'." | |||
| 509 | (setq result (cons "multipart/mixed" (nreverse result)))) | 509 | (setq result (cons "multipart/mixed" (nreverse result)))) |
| 510 | result))) | 510 | result))) |
| 511 | 511 | ||
| 512 | (defun mm-uu-dissect-text-parts (handle) | 512 | ;;;###autoload |
| 513 | "Dissect text parts and put uu handles into HANDLE." | 513 | (defun mm-uu-dissect-text-parts (handle &optional decoded) |
| 514 | "Dissect text parts and put uu handles into HANDLE. | ||
| 515 | Assume text has been decoded if DECODED is non-nil." | ||
| 514 | (let ((buffer (mm-handle-buffer handle))) | 516 | (let ((buffer (mm-handle-buffer handle))) |
| 515 | (cond ((stringp buffer) | 517 | (cond ((stringp buffer) |
| 516 | (dolist (elem (cdr handle)) | 518 | (dolist (elem (cdr handle)) |
| 517 | (mm-uu-dissect-text-parts elem))) | 519 | (mm-uu-dissect-text-parts elem decoded))) |
| 518 | ((bufferp buffer) | 520 | ((bufferp buffer) |
| 519 | (let ((type (mm-handle-media-type handle)) | 521 | (let ((type (mm-handle-media-type handle)) |
| 520 | (case-fold-search t) ;; string-match | 522 | (case-fold-search t) ;; string-match |
| 521 | encoding children) | 523 | children charset encoding) |
| 522 | (when (and | 524 | (when (and |
| 523 | (stringp type) | 525 | (stringp type) |
| 524 | ;; Mutt still uses application/pgp even though | 526 | ;; Mutt still uses application/pgp even though |
| 525 | ;; it has already been withdrawn. | 527 | ;; it has already been withdrawn. |
| 526 | (string-match "\\`text/\\|\\`application/pgp\\'" type) | 528 | (string-match "\\`text/\\|\\`application/pgp\\'" type) |
| 527 | (setq children | 529 | (setq |
| 528 | (with-current-buffer buffer | 530 | children |
| 529 | (if (setq encoding (mm-handle-encoding handle)) | 531 | (with-current-buffer buffer |
| 530 | ;; Inherit the multibyteness of the `buffer'. | 532 | (cond |
| 531 | (with-temp-buffer | 533 | ((or decoded |
| 532 | (insert-buffer-substring buffer) | 534 | (eq (setq charset (mail-content-type-get |
| 533 | (mm-decode-content-transfer-encoding | 535 | (mm-handle-type handle) |
| 534 | encoding type) | 536 | 'charset)) |
| 535 | (mm-uu-dissect t (mm-handle-type handle))) | 537 | 'gnus-decoded)) |
| 536 | (mm-uu-dissect t (mm-handle-type handle)))))) | 538 | (setq decoded t) |
| 539 | (mm-uu-dissect | ||
| 540 | t (cons type '((charset . gnus-decoded))))) | ||
| 541 | (charset | ||
| 542 | (setq decoded t) | ||
| 543 | (mm-with-multibyte-buffer | ||
| 544 | (insert (mm-decode-string (mm-get-part handle) | ||
| 545 | charset)) | ||
| 546 | (mm-uu-dissect | ||
| 547 | t (cons type '((charset . gnus-decoded)))))) | ||
| 548 | ((setq encoding (mm-handle-encoding handle)) | ||
| 549 | (setq decoded nil) | ||
| 550 | ;; Inherit the multibyteness of the `buffer'. | ||
| 551 | (with-temp-buffer | ||
| 552 | (insert-buffer-substring buffer) | ||
| 553 | (mm-decode-content-transfer-encoding | ||
| 554 | encoding type) | ||
| 555 | (mm-uu-dissect t (list type)))) | ||
| 556 | (t | ||
| 557 | (setq decoded nil) | ||
| 558 | (mm-uu-dissect t (list type))))))) | ||
| 537 | ;; Ignore it if a given part is dissected into a single | 559 | ;; Ignore it if a given part is dissected into a single |
| 538 | ;; part of which the type is the same as the given one. | 560 | ;; part of which the type is the same as the given one. |
| 539 | (if (and (<= (length children) 2) | 561 | (if (and (<= (length children) 2) |
| @@ -544,10 +566,10 @@ value of `mm-uu-text-plain-type'." | |||
| 544 | (setcdr handle (cdr children)) | 566 | (setcdr handle (cdr children)) |
| 545 | (setcar handle (car children)) ;; "multipart/mixed" | 567 | (setcar handle (car children)) ;; "multipart/mixed" |
| 546 | (dolist (elem (cdr children)) | 568 | (dolist (elem (cdr children)) |
| 547 | (mm-uu-dissect-text-parts elem)))))) | 569 | (mm-uu-dissect-text-parts elem decoded)))))) |
| 548 | (t | 570 | (t |
| 549 | (dolist (elem handle) | 571 | (dolist (elem handle) |
| 550 | (mm-uu-dissect-text-parts elem)))))) | 572 | (mm-uu-dissect-text-parts elem decoded)))))) |
| 551 | 573 | ||
| 552 | (provide 'mm-uu) | 574 | (provide 'mm-uu) |
| 553 | 575 | ||
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index d3737cd66fd..4723a694182 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; nnweb.el --- retrieving articles via web search engines | 1 | ;;; nnweb.el --- retrieving articles via web search engines |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, | 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, |
| 4 | ;; 2004, 2005 Free Software Foundation, Inc. | 4 | ;; 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 7 | ;; Keywords: news | 7 | ;; Keywords: news |
| @@ -27,11 +27,8 @@ | |||
| 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 Google Groups and Gmane, stuff | 30 | ;; FIXME: Due to changes in the HTML output of Gmane, stuff related to Gmane |
| 31 | ;; related to web groups (gnus-group-make-web-group) doesn't work anymore. | 31 | ;; web groups (`gnus-group-make-web-group') doesn't work anymore. |
| 32 | |||
| 33 | ;; Fetching an article by MID (cf. gnus-refer-article-method) over Google | ||
| 34 | ;; Groups should work. | ||
| 35 | 32 | ||
| 36 | ;;; Code: | 33 | ;;; Code: |
| 37 | 34 | ||
| @@ -61,6 +58,7 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 61 | (defvar nnweb-type-definition | 58 | (defvar nnweb-type-definition |
| 62 | 59 | ||
| 63 | (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") | 60 | (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") |
| 61 | (result . "http://groups.google.com/group/%s/msg/%s?dmode=source") | ||
| 64 | (article . nnweb-google-wash-article) | 62 | (article . nnweb-google-wash-article) |
| 65 | (reference . identity) | 63 | (reference . identity) |
| 66 | (map . nnweb-google-create-mapping) | 64 | (map . nnweb-google-create-mapping) |
| @@ -69,8 +67,9 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 69 | (base . "http://groups.google.com") | 67 | (base . "http://groups.google.com") |
| 70 | (identifier . nnweb-google-identity)) | 68 | (identifier . nnweb-google-identity)) |
| 71 | (dejanews ;; alias of google | 69 | (dejanews ;; alias of google |
| 72 | (article . ignore) | 70 | (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") |
| 73 | (id . "http://groups.google.com/groups?selm=%s&output=gplain") | 71 | (result . "http://groups.google.com/group/%s/msg/%s?dmode=source") |
| 72 | (article . nnweb-google-wash-article) | ||
| 74 | (reference . identity) | 73 | (reference . identity) |
| 75 | (map . nnweb-google-create-mapping) | 74 | (map . nnweb-google-create-mapping) |
| 76 | (search . nnweb-google-search) | 75 | (search . nnweb-google-search) |
| @@ -100,7 +99,7 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 100 | 99 | ||
| 101 | (defvoo nnweb-articles nil) | 100 | (defvoo nnweb-articles nil) |
| 102 | (defvoo nnweb-buffer nil) | 101 | (defvoo nnweb-buffer nil) |
| 103 | (defvoo nnweb-group-alist nil) | 102 | (defvar nnweb-group-alist nil) |
| 104 | (defvoo nnweb-group nil) | 103 | (defvoo nnweb-group nil) |
| 105 | (defvoo nnweb-hashtb nil) | 104 | (defvoo nnweb-hashtb nil) |
| 106 | 105 | ||
| @@ -123,25 +122,19 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 123 | (deffoo nnweb-request-scan (&optional group server) | 122 | (deffoo nnweb-request-scan (&optional group server) |
| 124 | (nnweb-possibly-change-server group server) | 123 | (nnweb-possibly-change-server group server) |
| 125 | (if nnweb-ephemeral-p | 124 | (if nnweb-ephemeral-p |
| 126 | (setq nnweb-hashtb (gnus-make-hashtable 4095))) | 125 | (setq nnweb-hashtb (gnus-make-hashtable 4095)) |
| 126 | (unless nnweb-articles | ||
| 127 | (nnweb-read-overview group))) | ||
| 127 | (funcall (nnweb-definition 'map)) | 128 | (funcall (nnweb-definition 'map)) |
| 128 | (unless nnweb-ephemeral-p | 129 | (unless nnweb-ephemeral-p |
| 129 | (nnweb-write-active) | 130 | (nnweb-write-active) |
| 130 | (nnweb-write-overview group))) | 131 | (nnweb-write-overview group))) |
| 131 | 132 | ||
| 132 | (deffoo nnweb-request-group (group &optional server dont-check) | 133 | (deffoo nnweb-request-group (group &optional server dont-check) |
| 133 | (nnweb-possibly-change-server nil server) | 134 | (nnweb-possibly-change-server group server) |
| 134 | (when (and group | 135 | (unless (or nnweb-ephemeral-p |
| 135 | (not (equal group nnweb-group)) | 136 | dont-check) |
| 136 | (not nnweb-ephemeral-p)) | 137 | (nnweb-read-overview group)) |
| 137 | (setq nnweb-group group | ||
| 138 | nnweb-articles nil) | ||
| 139 | (let ((info (assoc group nnweb-group-alist))) | ||
| 140 | (when info | ||
| 141 | (setq nnweb-type (nth 2 info)) | ||
| 142 | (setq nnweb-search (nth 3 info)) | ||
| 143 | (unless dont-check | ||
| 144 | (nnweb-read-overview group))))) | ||
| 145 | (cond | 138 | (cond |
| 146 | ((not nnweb-articles) | 139 | ((not nnweb-articles) |
| 147 | (nnheader-report 'nnweb "No matching articles")) | 140 | (nnheader-report 'nnweb "No matching articles")) |
| @@ -205,7 +198,7 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 205 | (nnweb-possibly-change-server nil server) | 198 | (nnweb-possibly-change-server nil server) |
| 206 | (save-excursion | 199 | (save-excursion |
| 207 | (set-buffer nntp-server-buffer) | 200 | (set-buffer nntp-server-buffer) |
| 208 | (nnmail-generate-active nnweb-group-alist) | 201 | (nnmail-generate-active (list (assoc server nnweb-group-alist))) |
| 209 | t)) | 202 | t)) |
| 210 | 203 | ||
| 211 | (deffoo nnweb-request-update-info (group info &optional server) | 204 | (deffoo nnweb-request-update-info (group info &optional server) |
| @@ -217,7 +210,7 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 217 | (deffoo nnweb-request-create-group (group &optional server args) | 210 | (deffoo nnweb-request-create-group (group &optional server args) |
| 218 | (nnweb-possibly-change-server nil server) | 211 | (nnweb-possibly-change-server nil server) |
| 219 | (nnweb-request-delete-group group) | 212 | (nnweb-request-delete-group group) |
| 220 | (push `(,group ,(cons 1 0) ,@args) nnweb-group-alist) | 213 | (push `(,group ,(cons 1 0)) nnweb-group-alist) |
| 221 | (nnweb-write-active) | 214 | (nnweb-write-active) |
| 222 | t) | 215 | t) |
| 223 | 216 | ||
| @@ -287,18 +280,16 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 287 | def)) | 280 | def)) |
| 288 | 281 | ||
| 289 | (defun nnweb-possibly-change-server (&optional group server) | 282 | (defun nnweb-possibly-change-server (&optional group server) |
| 290 | (nnweb-init server) | ||
| 291 | (when server | 283 | (when server |
| 292 | (unless (nnweb-server-opened server) | 284 | (unless (nnweb-server-opened server) |
| 293 | (nnweb-open-server server))) | 285 | (nnweb-open-server server)) |
| 286 | (nnweb-init server)) | ||
| 294 | (unless nnweb-group-alist | 287 | (unless nnweb-group-alist |
| 295 | (nnweb-read-active)) | 288 | (nnweb-read-active)) |
| 296 | (unless nnweb-hashtb | 289 | (unless nnweb-hashtb |
| 297 | (setq nnweb-hashtb (gnus-make-hashtable 4095))) | 290 | (setq nnweb-hashtb (gnus-make-hashtable 4095))) |
| 298 | (when group | 291 | (when group |
| 299 | (when (and (not nnweb-ephemeral-p) | 292 | (setq nnweb-group group))) |
| 300 | (equal group nnweb-group)) | ||
| 301 | (nnweb-request-group group nil t)))) | ||
| 302 | 293 | ||
| 303 | (defun nnweb-init (server) | 294 | (defun nnweb-init (server) |
| 304 | "Initialize buffers and such." | 295 | "Initialize buffers and such." |
| @@ -337,22 +328,27 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 337 | (mm-url-decode-entities)))) | 328 | (mm-url-decode-entities)))) |
| 338 | 329 | ||
| 339 | (defun nnweb-google-parse-1 (&optional Message-ID) | 330 | (defun nnweb-google-parse-1 (&optional Message-ID) |
| 331 | "Parse search result in current buffer." | ||
| 340 | (let ((i 0) | 332 | (let ((i 0) |
| 341 | (case-fold-search t) | 333 | (case-fold-search t) |
| 342 | (active (cadr (assoc nnweb-group nnweb-group-alist))) | 334 | (active (cadr (assoc nnweb-group nnweb-group-alist))) |
| 343 | Subject Score Date Newsgroups From | 335 | Subject Score Date Newsgroups From |
| 344 | map url mid) | 336 | map url mid) |
| 345 | (unless active | 337 | (unless active |
| 346 | (push (list nnweb-group (setq active (cons 1 0)) | 338 | (push (list nnweb-group (setq active (cons 1 0))) |
| 347 | nnweb-type nnweb-search) | ||
| 348 | nnweb-group-alist)) | 339 | nnweb-group-alist)) |
| 349 | ;; Go through all the article hits on this page. | 340 | ;; Go through all the article hits on this page. |
| 350 | (goto-char (point-min)) | 341 | (goto-char (point-min)) |
| 351 | (while (re-search-forward | 342 | (while |
| 352 | "a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t) | 343 | (re-search-forward |
| 353 | (setq mid (match-string 2) | 344 | "a +href=\"/group/\\([^>\"]+\\)/browse_thread/[^>]+#\\([0-9a-f]+\\)" |
| 345 | nil t) | ||
| 346 | (setq Newsgroups (match-string-no-properties 1) | ||
| 347 | ;; Note: Starting with Google Groups 2, `mid' is a Google-internal | ||
| 348 | ;; ID, not a proper Message-ID. | ||
| 349 | mid (match-string-no-properties 2) | ||
| 354 | url (format | 350 | url (format |
| 355 | (nnweb-definition 'id) mid)) | 351 | (nnweb-definition 'result) Newsgroups mid)) |
| 356 | (narrow-to-region (search-forward ">" nil t) | 352 | (narrow-to-region (search-forward ">" nil t) |
| 357 | (search-forward "</a>" nil t)) | 353 | (search-forward "</a>" nil t)) |
| 358 | (mm-url-remove-markup) | 354 | (mm-url-remove-markup) |
| @@ -360,25 +356,22 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 360 | (setq Subject (buffer-string)) | 356 | (setq Subject (buffer-string)) |
| 361 | (goto-char (point-max)) | 357 | (goto-char (point-max)) |
| 362 | (widen) | 358 | (widen) |
| 363 | (forward-line 2) | 359 | (narrow-to-region (point) |
| 364 | (when (looking-at "<br><font[^>]+>") | 360 | (search-forward "</td" nil t)) |
| 365 | (goto-char (match-end 0))) | 361 | |
| 366 | (if (not (looking-at "<a[^>]+>")) | 362 | (mm-url-remove-markup) |
| 367 | (skip-chars-forward " \t") | 363 | (mm-url-decode-entities) |
| 368 | (narrow-to-region (point) | 364 | (search-backward " - ") |
| 369 | (search-forward "</a>" nil t)) | ||
| 370 | (mm-url-remove-markup) | ||
| 371 | (mm-url-decode-entities) | ||
| 372 | (setq Newsgroups (buffer-string)) | ||
| 373 | (goto-char (point-max)) | ||
| 374 | (widen) | ||
| 375 | (skip-chars-forward "- \t")) | ||
| 376 | (when (looking-at | 365 | (when (looking-at |
| 377 | "\\([0-9]+\\)[/ ]\\([A-Za-z]+\\)[/ ]\\([0-9]+\\)[ \t]*by[ \t]*\\([^<]*\\) - <a") | 366 | " - \\([a-zA-Z]+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?, [^\n]+by \\([^<\n]+\\)\n") |
| 378 | (setq From (match-string 4) | 367 | (setq From (match-string 4) |
| 379 | Date (format "%s %s 00:00:00 %s" | 368 | Date (format "%s %s 00:00:00 %s" |
| 380 | (match-string 2) (match-string 1) | 369 | (match-string 1) |
| 381 | (match-string 3)))) | 370 | (match-string 2) |
| 371 | (or (match-string 3) | ||
| 372 | (substring (current-time-string) -4))))) | ||
| 373 | |||
| 374 | (widen) | ||
| 382 | (forward-line 1) | 375 | (forward-line 1) |
| 383 | (incf i) | 376 | (incf i) |
| 384 | (unless (nnweb-get-hashtb url) | 377 | (unless (nnweb-get-hashtb url) |
| @@ -419,7 +412,7 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 419 | (goto-char (point-min)) | 412 | (goto-char (point-min)) |
| 420 | (incf i 100) | 413 | (incf i 100) |
| 421 | (if (or (not (re-search-forward | 414 | (if (or (not (re-search-forward |
| 422 | "<td nowrap><a href=\\([^>]+\\).*<span class=b>Next</span>" nil t)) | 415 | "<td><a href=\"\n\\([^>\"]+\\)\"><img src=\"/img/nav_next" nil t)) |
| 423 | (>= i nnweb-max-hits)) | 416 | (>= i nnweb-max-hits)) |
| 424 | (setq more nil) | 417 | (setq more nil) |
| 425 | ;; Yup, there are more articles | 418 | ;; Yup, there are more articles |
| @@ -443,7 +436,8 @@ Valid types include `google', `dejanews', and `gmane'.") | |||
| 443 | ("hl" . "en") | 436 | ("hl" . "en") |
| 444 | ("lr" . "") | 437 | ("lr" . "") |
| 445 | ("safe" . "off") | 438 | ("safe" . "off") |
| 446 | ("sites" . "groups"))))) | 439 | ("sites" . "groups") |
| 440 | ("filter" . "0"))))) | ||
| 447 | t) | 441 | t) |
| 448 | 442 | ||
| 449 | (defun nnweb-google-identity (url) | 443 | (defun nnweb-google-identity (url) |
diff --git a/man/ChangeLog b/man/ChangeLog index 8fc41f40f11..e7c90d400bc 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-01-31 Romain Francoise <romain@orebokech.com> | ||
| 2 | |||
| 3 | * message.texi (Message Headers): Explain what | ||
| 4 | `message-alternative-emails' does in more detail. | ||
| 5 | Update copyright year. | ||
| 6 | |||
| 1 | 2006-01-31 Richard M. Stallman <rms@gnu.org> | 7 | 2006-01-31 Richard M. Stallman <rms@gnu.org> |
| 2 | 8 | ||
| 3 | * display.texi (Scrolling, Horizontal Scrolling, Follow Mode): | 9 | * display.texi (Scrolling, Horizontal Scrolling, Follow Mode): |
diff --git a/man/message.texi b/man/message.texi index b2cd3aa782d..2cb2de02a8b 100644 --- a/man/message.texi +++ b/man/message.texi | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | This file documents Message, the Emacs message composition mode. | 9 | This file documents Message, the Emacs message composition mode. |
| 10 | 10 | ||
| 11 | Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 11 | Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 12 | 2005 Free Software Foundation, Inc. | 12 | 2005, 2006 Free Software Foundation, Inc. |
| 13 | 13 | ||
| 14 | @quotation | 14 | @quotation |
| 15 | Permission is granted to copy, distribute and/or modify this document | 15 | Permission is granted to copy, distribute and/or modify this document |
| @@ -1386,8 +1386,23 @@ trailing old subject. In this case, | |||
| 1386 | 1386 | ||
| 1387 | @item message-alternative-emails | 1387 | @item message-alternative-emails |
| 1388 | @vindex message-alternative-emails | 1388 | @vindex message-alternative-emails |
| 1389 | A regexp to match the alternative email addresses. The first matched | 1389 | Regexp matching alternative email addresses. The first address in the |
| 1390 | address (not primary one) is used in the @code{From} field. | 1390 | To, Cc or From headers of the original article matching this variable is |
| 1391 | used as the From field of outgoing messages, replacing the default From | ||
| 1392 | value. | ||
| 1393 | |||
| 1394 | For example, if you have two secondary email addresses john@@home.net | ||
| 1395 | and john.doe@@work.com and want to use them in the From field when | ||
| 1396 | composing a reply to a message addressed to one of them, you could set | ||
| 1397 | this variable like this: | ||
| 1398 | |||
| 1399 | @lisp | ||
| 1400 | (setq message-alternative-emails | ||
| 1401 | (regexp-opt '("john@@home.net" "john.doe@@work.com"))) | ||
| 1402 | @end lisp | ||
| 1403 | |||
| 1404 | This variable has precedence over posting styles and anything that runs | ||
| 1405 | off @code{message-setup-hook}. | ||
| 1391 | 1406 | ||
| 1392 | @item message-allow-no-recipients | 1407 | @item message-allow-no-recipients |
| 1393 | @vindex message-allow-no-recipients | 1408 | @vindex message-allow-no-recipients |