# HG changeset patch # User Katsumi Yamaoka # Date 1283818328 0 # Node ID 866fdd23abb539d2471cb37546e9b3b1e4a3817f # Parent b02c6c7716e47c6e9375db99477e6e80d58232c9# Parent b350cc580a0f1e5d73bfba9e204d0e41334bad2d Merge changes made in Gnus trunk: nnml.el (nnml-save-nov): Remove some debugging-related messages. gnus-start.el (gnus-read-active-for-groups): Do a `gnus-request-scan' for the methods that support -retrieve-groups, too. gnus-html.el (gnus-html-wash-tags): Remove tags, which confuses the rest of the function. gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too. nntp.el (nntp-wait-for-string): Supply a timeout for accept-process-output to ensure progress. gnus-async.el (gnus-async-article-callback): Always prefetch images for groups that want that. gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the current line to work around bugs in the output from w3m. diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/ChangeLog Tue Sep 07 00:12:08 2010 +0000 @@ -1,3 +1,26 @@ +2010-09-06 Lars Magne Ingebrigtsen + + * gnus-html.el (gnus-html-wash-tags): Limit end-tag matching to the + current line to work around bugs in the output from w3m. + + * gnus-async.el (gnus-async-article-callback): Always prefetch images + for groups that want that. + + * nntp.el (nntp-wait-for-string): Supply a timeout for + accept-process-output to ensure progress. + + * gnus-start.el (gnus-get-unread-articles): If being given an explicit + level to get unread articles from, then use that for foreign groups, + too. + + * gnus-html.el (gnus-html-wash-tags): Remove tags, which + confuses the rest of the function. + + * gnus-start.el (gnus-read-active-for-groups): Do a `gnus-request-scan' + for the methods that support -retrieve-groups, too. + + * nnml.el (nnml-save-nov): Remove some debugging-related messages. + 2010-09-06 Katsumi Yamaoka * pop3.el: Require cl when compiling. diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/gnus-async.el --- a/lisp/gnus/gnus-async.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/gnus-async.el Tue Sep 07 00:12:08 2010 +0000 @@ -238,6 +238,9 @@ (save-excursion (save-restriction (narrow-to-region mark (point-max)) + ;; Prefetch images for the groups that want that. + (when (fboundp 'gnus-html-prefetch-images) + (gnus-async-post-fetch-function summary)) (funcall gnus-async-post-fetch-function summary)))) (gnus-async-with-semaphore (setq diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/gnus-html.el --- a/lisp/gnus/gnus-html.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/gnus-html.el Tue Sep 07 00:12:08 2010 +0000 @@ -117,6 +117,9 @@ (while (re-search-forward " * * *\n" nil t) (replace-match "" t t)) (goto-char (point-min)) + (while (re-search-forward "]+>" nil t) + (replace-match "" t t)) + (goto-char (point-min)) (while (re-search-forward "<\\([^ />]+\\)\\([^>]*\\)>" nil t) (setq tag (match-string 1) parameters (match-string 2) @@ -124,7 +127,7 @@ (when (plusp (length parameters)) (set-text-properties 0 (1- (length parameters)) nil parameters)) (delete-region start (point)) - (when (search-forward (concat "") nil t) + (when (search-forward (concat "") (line-end-position) t) (delete-region (match-beginning 0) (match-end 0))) (setq end (point)) (cond @@ -221,7 +224,7 @@ (goto-char (point-min)) ;; The output from -halfdump isn't totally regular, so strip ;; off any s that were left over. - (while (re-search-forward "" nil t) + (while (re-search-forward "\\|" nil t) (replace-match "" t t)) (when images (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))) diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/gnus-start.el --- a/lisp/gnus/gnus-start.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/gnus-start.el Tue Sep 07 00:12:08 2010 +0000 @@ -1677,14 +1677,16 @@ (let* ((newsrc (cdr gnus-newsrc-alist)) (alevel (or level gnus-activate-level (1+ gnus-level-subscribed))) (foreign-level - (min - (cond ((and gnus-activate-foreign-newsgroups - (not (numberp gnus-activate-foreign-newsgroups))) - (1+ gnus-level-subscribed)) - ((numberp gnus-activate-foreign-newsgroups) - gnus-activate-foreign-newsgroups) - (t 0)) - alevel)) + (or + level + (min + (cond ((and gnus-activate-foreign-newsgroups + (not (numberp gnus-activate-foreign-newsgroups))) + (1+ gnus-level-subscribed)) + ((numberp gnus-activate-foreign-newsgroups) + gnus-activate-foreign-newsgroups) + (t 0)) + alevel))) (methods-cache nil) (type-cache nil) (gnus-agent-article-local-times 0) @@ -1792,6 +1794,8 @@ (with-current-buffer nntp-server-buffer (cond ((gnus-check-backend-function 'retrieve-groups (car method)) + (when (gnus-check-backend-function 'request-scan (car method)) + (gnus-request-scan nil method)) (gnus-read-active-file-2 (mapcar (lambda (info) (gnus-group-real-name (gnus-info-group info))) diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/nnml.el --- a/lisp/gnus/nnml.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/nnml.el Tue Sep 07 00:12:08 2010 +0000 @@ -784,7 +784,6 @@ (defvar nnml-incremental-nov-buffer-alist nil) (defun nnml-save-incremental-nov () - (message "nnml saving incremental nov...") (save-excursion (while nnml-incremental-nov-buffer-alist (when (buffer-name (cdar nnml-incremental-nov-buffer-alist)) @@ -795,8 +794,7 @@ (set-buffer-modified-p nil) (kill-buffer (current-buffer))) (setq nnml-incremental-nov-buffer-alist - (cdr nnml-incremental-nov-buffer-alist)))) - (message "nnml saving incremental nov...done")) + (cdr nnml-incremental-nov-buffer-alist))))) (defun nnml-open-incremental-nov (group) (or (cdr (assoc group nnml-incremental-nov-buffer-alist)) @@ -863,7 +861,6 @@ buffer))) (defun nnml-save-nov () - (message "nnml saving nov...") (save-excursion (while nnml-nov-buffer-alist (when (buffer-name (cdar nnml-nov-buffer-alist)) @@ -873,8 +870,7 @@ nnml-nov-buffer-file-name nil 'nomesg)) (set-buffer-modified-p nil) (kill-buffer (current-buffer))) - (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist)))) - (message "nnml saving nov...done")) + (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist))))) ;;;###autoload (defun nnml-generate-nov-databases (&optional server) diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/nntp.el --- a/lisp/gnus/nntp.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/nntp.el Tue Sep 07 00:12:08 2010 +0000 @@ -1768,7 +1768,7 @@ (while (and (setq proc (get-buffer-process buf)) (memq (process-status proc) '(open run)) (not (re-search-forward regexp nil t))) - (accept-process-output proc) + (accept-process-output proc 0.1) (set-buffer buf) (goto-char (point-min))))) diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/gnus/spam-report.el --- a/lisp/gnus/spam-report.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/gnus/spam-report.el Tue Sep 07 00:12:08 2010 +0000 @@ -267,7 +267,7 @@ (gnus-message 7 "Waiting for response from %s..." host) (while (and (memq (process-status tcp-connection) '(open run)) (zerop (buffer-size))) - (accept-process-output tcp-connection)) + (accept-process-output tcp-connection 1)) (gnus-message 7 "Waiting for response from %s... done" host))))) ;;;###autoload diff -r b02c6c7716e4 -r 866fdd23abb5 lisp/mail/hashcash.el --- a/lisp/mail/hashcash.el Mon Sep 06 12:40:56 2010 -0400 +++ b/lisp/mail/hashcash.el Tue Sep 07 00:12:08 2010 +0000 @@ -276,7 +276,7 @@ (unless buffer (setq buffer (current-buffer))) (let (entry) (while (setq entry (rassq buffer hashcash-process-alist)) - (accept-process-output (car entry))))) + (accept-process-output (car entry) 1)))) (defun hashcash-processes-running-p (buffer) "Return non-nil if hashcash processes in BUFFER are still running."