Mercurial > emacs
comparison lisp/gnus/gnus-sum.el @ 111430:b75e6634a171
gnus-int.el, nnimap.el, nnir.el: More improvements to thread-referral.
message.el (message-send-mail): Don't insert courtesy messages if the message already has List-Post and List-ID messages.
gnus-ems.el (gnus-put-image): Use a blank text as the insertion string to avoid making the From headers syntactically invalid.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 07 Nov 2010 00:22:06 +0000 |
parents | 733acab855e4 |
children | eb9988805a37 |
comparison
equal
deleted
inserted
replaced
111429:249a1455856a | 111430:b75e6634a171 |
---|---|
2059 "r" gnus-summary-refer-parent-article | 2059 "r" gnus-summary-refer-parent-article |
2060 "C" gnus-summary-show-complete-article | 2060 "C" gnus-summary-show-complete-article |
2061 "D" gnus-summary-enter-digest-group | 2061 "D" gnus-summary-enter-digest-group |
2062 "R" gnus-summary-refer-references | 2062 "R" gnus-summary-refer-references |
2063 "T" gnus-summary-refer-thread | 2063 "T" gnus-summary-refer-thread |
2064 "W" gnus-warp-to-article | |
2064 "g" gnus-summary-show-article | 2065 "g" gnus-summary-show-article |
2065 "s" gnus-summary-isearch-article | 2066 "s" gnus-summary-isearch-article |
2066 "P" gnus-summary-print-article | 2067 "P" gnus-summary-print-article |
2067 "S" gnus-sticky-article | 2068 "S" gnus-sticky-article |
2068 "M" gnus-mailing-list-insinuate | 2069 "M" gnus-mailing-list-insinuate |
5466 (setq subject | 5467 (setq subject |
5467 (concat (substring subject 0 (match-beginning 1)) | 5468 (concat (substring subject 0 (match-beginning 1)) |
5468 (substring subject (match-end 1))))) | 5469 (substring subject (match-end 1))))) |
5469 (mail-header-set-subject header subject)))))) | 5470 (mail-header-set-subject header subject)))))) |
5470 | 5471 |
5471 (defun gnus-fetch-headers (articles) | 5472 (defun gnus-fetch-headers (articles &optional limit force-new dependencies) |
5472 "Fetch headers of ARTICLES." | 5473 "Fetch headers of ARTICLES." |
5473 (let ((name (gnus-group-decoded-name gnus-newsgroup-name))) | 5474 (let ((name (gnus-group-decoded-name gnus-newsgroup-name))) |
5474 (gnus-message 5 "Fetching headers for %s..." name) | 5475 (gnus-message 5 "Fetching headers for %s..." name) |
5475 (prog1 | 5476 (prog1 |
5476 (if (eq 'nov | 5477 (if (eq 'nov |
5477 (setq gnus-headers-retrieved-by | 5478 (setq gnus-headers-retrieved-by |
5478 (gnus-retrieve-headers | 5479 (gnus-retrieve-headers |
5479 articles gnus-newsgroup-name | 5480 articles gnus-newsgroup-name |
5480 ;; We might want to fetch old headers, but | 5481 (or limit |
5481 ;; not if there is only 1 article. | 5482 ;; We might want to fetch old headers, but |
5482 (and (or (and | 5483 ;; not if there is only 1 article. |
5483 (not (eq gnus-fetch-old-headers 'some)) | 5484 (and (or (and |
5484 (not (numberp gnus-fetch-old-headers))) | 5485 (not (eq gnus-fetch-old-headers 'some)) |
5485 (> (length articles) 1)) | 5486 (not (numberp gnus-fetch-old-headers))) |
5486 gnus-fetch-old-headers)))) | 5487 (> (length articles) 1)) |
5488 gnus-fetch-old-headers))))) | |
5487 (gnus-get-newsgroup-headers-xover | 5489 (gnus-get-newsgroup-headers-xover |
5488 articles nil nil gnus-newsgroup-name t) | 5490 articles force-new dependencies gnus-newsgroup-name t) |
5489 (gnus-get-newsgroup-headers)) | 5491 (gnus-get-newsgroup-headers dependencies force-new)) |
5490 (gnus-message 5 "Fetching headers for %s...done" name)))) | 5492 (gnus-message 5 "Fetching headers for %s...done" name)))) |
5491 | 5493 |
5492 (defun gnus-select-newsgroup (group &optional read-all select-articles) | 5494 (defun gnus-select-newsgroup (group &optional read-all select-articles) |
5493 "Select newsgroup GROUP. | 5495 "Select newsgroup GROUP. |
5494 If READ-ALL is non-nil, all articles in the group are selected. | 5496 If READ-ALL is non-nil, all articles in the group are selected. |
8833 If no backend-specific 'request-thread function is available | 8835 If no backend-specific 'request-thread function is available |
8834 fetch LIMIT (the numerical prefix) old headers. If LIMIT is nil | 8836 fetch LIMIT (the numerical prefix) old headers. If LIMIT is nil |
8835 fetch what's specified by the `gnus-refer-thread-limit' | 8837 fetch what's specified by the `gnus-refer-thread-limit' |
8836 variable." | 8838 variable." |
8837 (interactive "P") | 8839 (interactive "P") |
8840 (gnus-warp-to-article) | |
8838 (let ((id (mail-header-id (gnus-summary-article-header))) | 8841 (let ((id (mail-header-id (gnus-summary-article-header))) |
8839 (subject (gnus-simplify-subject | 8842 (gnus-inhibit-demon t) |
8840 (mail-header-subject (gnus-summary-article-header)))) | 8843 (gnus-agent nil) |
8841 (refs (split-string (or (mail-header-references | |
8842 (gnus-summary-article-header)) ""))) | |
8843 (gnus-summary-ignore-duplicates t) | 8844 (gnus-summary-ignore-duplicates t) |
8844 (gnus-inhibit-demon t) | |
8845 (gnus-read-all-available-headers t) | 8845 (gnus-read-all-available-headers t) |
8846 (limit (if limit (prefix-numeric-value limit) | 8846 (limit (if limit (prefix-numeric-value limit) |
8847 gnus-refer-thread-limit))) | 8847 gnus-refer-thread-limit))) |
8848 (if (gnus-check-backend-function 'request-thread gnus-newsgroup-name) | 8848 (setq gnus-newsgroup-headers |
8849 (setq gnus-newsgroup-headers | 8849 (gnus-merge |
8850 (gnus-merge 'list | 8850 'list gnus-newsgroup-headers |
8851 gnus-newsgroup-headers | 8851 (if (gnus-check-backend-function |
8852 (gnus-request-thread id) | 8852 'request-thread gnus-newsgroup-name) |
8853 'gnus-article-sort-by-number)) | 8853 (gnus-request-thread id) |
8854 (unless (eq gnus-fetch-old-headers 'invisible) | 8854 (let* ((last (if (numberp limit) |
8855 (gnus-message 5 "Fetching headers for %s..." gnus-newsgroup-name) | 8855 (min (+ (mail-header-number |
8856 ;; Retrieve the headers and read them in. | 8856 (gnus-summary-article-header)) |
8857 (if (numberp limit) | 8857 limit) |
8858 (gnus-retrieve-headers | 8858 gnus-newsgroup-highest) |
8859 (list (min | 8859 gnus-newsgroup-highest)) |
8860 (+ (mail-header-number | 8860 (subject (gnus-simplify-subject |
8861 (gnus-summary-article-header)) | 8861 (mail-header-subject |
8862 limit) | 8862 (gnus-summary-article-header)))) |
8863 gnus-newsgroup-end)) | 8863 (refs (split-string (or (mail-header-references |
8864 gnus-newsgroup-name (* limit 2)) | 8864 (gnus-summary-article-header)) |
8865 ;; gnus-refer-thread-limit is t, i.e. fetch _all_ | 8865 ""))) |
8866 ;; headers. | 8866 (gnus-parse-headers-hook |
8867 (gnus-retrieve-headers (list gnus-newsgroup-end) | 8867 (lambda () (goto-char (point-min)) |
8868 gnus-newsgroup-name limit) | 8868 (keep-lines |
8869 (gnus-message 5 "Fetching headers for %s...done" | 8869 (regexp-opt (append refs (list id subject))))))) |
8870 gnus-newsgroup-name)))) | 8870 (gnus-fetch-headers (list last) (if (numberp limit) |
8871 (when (eq gnus-headers-retrieved-by 'nov) | 8871 (* 2 limit) limit) t))) |
8872 ;; might as well restrict the headers to the relevant ones. this | 8872 'gnus-article-sort-by-number)) |
8873 ;; should save time when building threads. | |
8874 (with-current-buffer nntp-server-buffer | |
8875 (goto-char (point-min)) | |
8876 (keep-lines (regexp-opt (append refs (list id subject))))) | |
8877 (gnus-build-all-threads)) | |
8878 (gnus-summary-limit-include-thread id))) | 8873 (gnus-summary-limit-include-thread id))) |
8879 | 8874 |
8880 (defun gnus-summary-refer-article (message-id) | 8875 (defun gnus-summary-refer-article (message-id) |
8881 "Fetch an article specified by MESSAGE-ID." | 8876 "Fetch an article specified by MESSAGE-ID." |
8882 (interactive "sMessage-ID: ") | 8877 (interactive "sMessage-ID: ") |