*** pub/rgnus/lisp/gnus-async.el Sun Aug 25 02:12:01 1996 --- rgnus/lisp/gnus-async.el Mon Aug 26 22:51:50 1996 *************** *** 29,34 **** --- 29,38 ---- (require 'gnus-sum) (require 'nntp) + (defvar gnus-asynchronous t + "*If nil, inhibit all Gnus asynchronicity. + If non-nil, let the other asynch variables be heeded.") + (defvar gnus-use-article-prefetch 30 "*If non-nil, prefetch articles in groups that allow this. If a number, prefetch only that many articles forward; *************** *** 93,150 **** (defun gnus-async-prefetch-article (group article summary &optional next) "Possibly prefetch several articles starting with ARTICLE." ! (when next ! (gnus-async-get-semaphore 'gnus-async-article-semaphore) ! (pop gnus-async-fetch-list) ! (gnus-async-release-semaphore 'gnus-async-article-semaphore)) ! (let ((do-fetch next)) ! (when (and (gnus-group-asynchronous-p group) ! (gnus-buffer-live-p summary) ! (or (not next) ! gnus-async-fetch-list)) ! (unwind-protect ! (progn ! (gnus-async-get-semaphore 'gnus-async-article-semaphore) ! (unless next ! (setq do-fetch (not gnus-async-fetch-list)) ! ;; Nix out any outstanding requests. ! (setq gnus-async-fetch-list nil) ! ;; Fill in the new list. ! (let ((n gnus-use-article-prefetch) ! (data (gnus-data-find-list article)) ! d) ! (while (and (setq d (pop data)) ! (if (numberp n) ! (natnump (decf n)) ! n)) ! (unless (or (gnus-async-prefetched-article-entry ! group (setq article (gnus-data-number d))) ! (not (natnump article))) ! ;; Not already fetched -- so we add it to the list. ! (push article gnus-async-fetch-list))) ! (setq gnus-async-fetch-list (nreverse gnus-async-fetch-list)))) ! (when do-fetch ! (setq article (pop gnus-async-fetch-list)))) ! (gnus-async-release-semaphore 'gnus-async-article-semaphore)) ! (when article ! ;; We want to fetch some more articles. ! (save-excursion ! (set-buffer summary) ! (let (mark) ! (gnus-async-set-buffer) ! (goto-char (point-max)) ! (setq mark (point-marker)) ! (let ((nnheader-callback-function ! (gnus-make-async-article-function ! group article mark summary next)) ! (nntp-server-buffer (get-buffer ! gnus-async-prefetch-article-buffer))) ! (gnus-message 7 "Prefetching article %d in group %s" ! article group) ! (gnus-request-article article group)))))))) (defun gnus-make-async-article-function (group article mark summary next) "Return a callback function." --- 97,156 ---- (defun gnus-async-prefetch-article (group article summary &optional next) "Possibly prefetch several articles starting with ARTICLE." ! (when (and gnus-asynchronous ! (gnus-alive-p)) ! (when next ! (gnus-async-get-semaphore 'gnus-async-article-semaphore) ! (pop gnus-async-fetch-list) ! (gnus-async-release-semaphore 'gnus-async-article-semaphore)) ! (let ((do-fetch next)) ! (when (and (gnus-group-asynchronous-p group) ! (gnus-buffer-live-p summary) ! (or (not next) ! gnus-async-fetch-list)) ! (unwind-protect ! (progn ! (gnus-async-get-semaphore 'gnus-async-article-semaphore) ! (unless next ! (setq do-fetch (not gnus-async-fetch-list)) ! ;; Nix out any outstanding requests. ! (setq gnus-async-fetch-list nil) ! ;; Fill in the new list. ! (let ((n gnus-use-article-prefetch) ! (data (gnus-data-find-list article)) ! d) ! (while (and (setq d (pop data)) ! (if (numberp n) ! (natnump (decf n)) ! n)) ! (unless (or (gnus-async-prefetched-article-entry ! group (setq article (gnus-data-number d))) ! (not (natnump article))) ! ;; Not already fetched -- so we add it to the list. ! (push article gnus-async-fetch-list))) ! (setq gnus-async-fetch-list (nreverse gnus-async-fetch-list)))) ! (when do-fetch ! (setq article (pop gnus-async-fetch-list)))) ! (gnus-async-release-semaphore 'gnus-async-article-semaphore)) ! (when article ! ;; We want to fetch some more articles. ! (save-excursion ! (set-buffer summary) ! (let (mark) ! (gnus-async-set-buffer) ! (goto-char (point-max)) ! (setq mark (point-marker)) ! (let ((nnheader-callback-function ! (gnus-make-async-article-function ! group article mark summary next)) ! (nntp-server-buffer (get-buffer ! gnus-async-prefetch-article-buffer))) ! (gnus-message 7 "Prefetching article %d in group %s" ! article group) ! (gnus-request-article article group))))))))) (defun gnus-make-async-article-function (group article mark summary next) "Return a callback function." *************** *** 212,217 **** --- 218,224 ---- (save-excursion (let (unread) (when (and gnus-use-header-prefetch + gnus-asynchronous (gnus-group-asynchronous-p group) (listp gnus-async-header-prefetched) (setq unread (gnus-list-of-unread-articles group))) *** pub/rgnus/lisp/gnus-score.el Sun Aug 25 21:04:55 1996 --- rgnus/lisp/gnus-score.el Tue Aug 27 00:06:32 1996 *************** *** 187,200 **** "re") "Default list of words to be ignored when doing adaptive word scoring.") - (defvar gnus-adaptive-word-syntax-table - (let ((table (copy-syntax-table (standard-syntax-table))) - (numbers '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))) - (while numbers - (modify-syntax-entry (pop numbers) " " table)) - table) - "Syntax table used when doing adaptive word scoring.") - (defvar gnus-default-adaptive-word-score-alist `((,gnus-read-mark . 30) (,gnus-catchup-mark . -10) --- 187,192 ---- *************** *** 273,278 **** --- 265,278 ---- ;; Internal variables. + + (defvar gnus-adaptive-word-syntax-table + (let ((table (copy-syntax-table (standard-syntax-table))) + (numbers '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))) + (while numbers + (modify-syntax-entry (pop numbers) " " table)) + table) + "Syntax table used when doing adaptive word scoring.") (defvar gnus-scores-exclude-files nil) (defvar gnus-internal-global-score-files nil) *** pub/rgnus/lisp/gnus-topic.el Sat Aug 24 23:26:10 1996 --- rgnus/lisp/gnus-topic.el Tue Aug 27 00:39:08 1996 *************** *** 288,298 **** (error "No such topic: %s" topic)) ;; We may have to extend if there is no parameters here ;; to begin with. ! (unless (nthcdr 2 (car top)) ! (nconc (car top) (list nil))) ! (unless (nthcdr 3 (car top)) ! (nconc (car top) (list nil))) ! (setcar (nthcdr 3 (car top)) parameters))) (defun gnus-group-topic-parameters (group) "Compute the group parameters for GROUP taking into account inheretance from topics." --- 288,298 ---- (error "No such topic: %s" topic)) ;; We may have to extend if there is no parameters here ;; to begin with. ! (unless (nthcdr 2 (cadr top)) ! (nconc (cadr top) (list nil))) ! (unless (nthcdr 3 (cadr top)) ! (nconc (cadr top) (list nil))) ! (setcar (nthcdr 3 (cadr top)) parameters))) (defun gnus-group-topic-parameters (group) "Compute the group parameters for GROUP taking into account inheretance from topics." *************** *** 639,645 **** (let ((topic-name (pop topic)) group filtered-topic) (while (setq group (pop topic)) ! (if (and (gnus-gethash group gnus-active-hashtb) (not (gnus-gethash group gnus-killed-hashtb))) (push group filtered-topic))) (push (cons topic-name (nreverse filtered-topic)) result))) --- 639,646 ---- (let ((topic-name (pop topic)) group filtered-topic) (while (setq group (pop topic)) ! (if (and (or (gnus-gethash group gnus-active-hashtb) ! (gnus-info-method (gnus-get-info group))) (not (gnus-gethash group gnus-killed-hashtb))) (push group filtered-topic))) (push (cons topic-name (nreverse filtered-topic)) result))) *** pub/rgnus/lisp/gnus.el Sun Aug 25 22:24:56 1996 --- rgnus/lisp/gnus.el Mon Aug 26 22:26:27 1996 *************** *** 28,34 **** (eval '(run-hooks 'gnus-load-hook)) ! (defconst gnus-version-number "0.15" "Version number for this version of Gnus.") (defconst gnus-version (format "Red Gnus v%s" gnus-version-number) --- 28,34 ---- (eval '(run-hooks 'gnus-load-hook)) ! (defconst gnus-version-number "0.16" "Version number for this version of Gnus.") (defconst gnus-version (format "Red Gnus v%s" gnus-version-number) *** pub/rgnus/lisp/nntp.el Sun Aug 25 21:28:23 1996 --- rgnus/lisp/nntp.el Tue Aug 27 00:06:30 1996 *************** *** 252,257 **** --- 252,258 ---- (let ((count 0) (received 0) (last-point (point-min)) + (nntp-inhibit-erase t) (command (if nntp-server-list-active-group "LIST ACTIVE" "GROUP"))) (while groups ;; Send the command to the server. *** pub/rgnus/lisp/nnweb.el Sun Aug 25 23:50:40 1996 --- rgnus/lisp/nnweb.el Tue Aug 27 00:27:00 1996 *************** *** 97,103 **** (nnheader-insert "211 %d %d %d %s\n" (length nnweb-articles) (caar nnweb-articles) (caar (last nnweb-articles)) ! group)))) (deffoo nnweb-request-article (article &optional group server buffer) (nnweb-possibly-change-server server) --- 97,108 ---- (nnheader-insert "211 %d %d %d %s\n" (length nnweb-articles) (caar nnweb-articles) (caar (last nnweb-articles)) ! group)))) ! ! (deffoo nnweb-close-group (group &optional server) ! (nnweb-possibly-change-server server) ! (gnus-kill-buffer nnweb-buffer) ! t) (deffoo nnweb-request-article (article &optional group server buffer) (nnweb-possibly-change-server server) *************** *** 173,187 **** t))) (defun nnweb-callback (buffer callback) ! (save-excursion ! (set-buffer url-working-buffer) ! (funcall (nnweb-definition 'article)) ! (nnweb-decode-entities) ! (set-buffer buffer) ! (goto-char (point-max)) ! (insert-buffer-substring url-working-buffer)) ! (funcall callback t) ! (gnus-kill-buffer url-working-buffer)) (defun nnweb-url-retrieve-asynch (url callback &rest data) (let ((url-request-method "GET") --- 178,193 ---- t))) (defun nnweb-callback (buffer callback) ! (when (gnus-buffer-live-p url-working-buffer) ! (save-excursion ! (set-buffer url-working-buffer) ! (funcall (nnweb-definition 'article)) ! (nnweb-decode-entities) ! (set-buffer buffer) ! (goto-char (point-max)) ! (insert-buffer-substring url-working-buffer)) ! (funcall callback t) ! (gnus-kill-buffer url-working-buffer))) (defun nnweb-url-retrieve-asynch (url callback &rest data) (let ((url-request-method "GET") *************** *** 240,250 **** (defun nnweb-dejanews-create-mapping () "Perform the search and create an number-to-url alist." (save-excursion ! (set-buffer nnweb-buffer) ! (erase-buffer) ! (when (funcall (nnweb-definition 'search) nnweb-search) (let ((i 0) (more t) Subject Score Date Newsgroup Author map url) (while more --- 246,257 ---- (defun nnweb-dejanews-create-mapping () "Perform the search and create an number-to-url alist." (save-excursion ! ;(set-buffer nnweb-buffer) ! ;(erase-buffer) ! (when (or t (funcall (nnweb-definition 'search) nnweb-search)) (let ((i 0) (more t) + (case-fold-search t) Subject Score Date Newsgroup Author map url) (while more *************** *** 294,314 **** (setq nnweb-articles (nreverse map)))))) (defun nnweb-dejanews-wash-article () ! (goto-char (point-min)) ! (re-search-forward "
" nil t) ! (delete-region (point-min) (point)) ! (re-search-forward "" nil t) ! (delete-region (point) (point-max)) ! (nnweb-remove-markup) ! (goto-char (point-min)) ! (while (and (looking-at " *$") ! (not (eobp))) ! (gnus-delete-line)) ! (while (looking-at "\\(^[^ ]+:\\) *") ! (replace-match "\\1 " t) ! (forward-line 1)) ! (when (re-search-forward "\n\n+" nil t) ! (replace-match "\n" t t))) (defun nnweb-dejanews-search (search) (nnweb-fetch-form --- 301,322 ---- (setq nnweb-articles (nreverse map)))))) (defun nnweb-dejanews-wash-article () ! (let ((case-fold-search t)) ! (goto-char (point-min)) ! (re-search-forward "
" nil t) ! (delete-region (point-min) (point)) ! (re-search-forward "" nil t) ! (delete-region (point) (point-max)) ! (nnweb-remove-markup) ! (goto-char (point-min)) ! (while (and (looking-at " *$") ! (not (eobp))) ! (gnus-delete-line)) ! (while (looking-at "\\(^[^ ]+:\\) *") ! (replace-match "\\1 " t) ! (forward-line 1)) ! (when (re-search-forward "\n\n+" nil t) ! (replace-match "\n" t t)))) (defun nnweb-dejanews-search (search) (nnweb-fetch-form *************** *** 335,340 **** --- 343,349 ---- (when (funcall (nnweb-definition 'search) nnweb-search) (let ((i 0) (more t) + (case-fold-search t) Subject Score Date Newsgroups From Message-ID map url) (while more *************** *** 376,417 **** (setq nnweb-articles (nreverse map)))))) (defun nnweb-reference-wash-article () ! (goto-char (point-min)) ! (re-search-forward "^
" nil t) ! (forward-line -1) ! (let ((body (point-marker))) ! (search-forward "" nil t) ! (delete-region (point) (point-max)) ! (nnweb-remove-markup) ! (goto-char (point-min)) ! (while (looking-at " *$") ! (gnus-delete-line)) ! (narrow-to-region (point-min) body) ! (while (and (re-search-forward "^$" nil t) ! (not (eobp))) ! (gnus-delete-line)) ! (goto-char (point-min)) ! (while (looking-at "\\(^[^ ]+:\\) *") ! (replace-match "\\1 " t) ! (forward-line 1)) (goto-char (point-min)) ! (when (re-search-forward "^References:" nil t) ! (narrow-to-region ! (point) (if (re-search-forward "^$\\|^[^:]+:" nil t) ! (match-beginning 0) ! (point-max))) (goto-char (point-min)) ! (while (not (eobp)) ! (unless (looking-at "References") ! (insert "\t") ! (forward-line 1))) (goto-char (point-min)) ! (while (search-forward "," nil t) ! (replace-match " " t t))) ! (widen) ! (set-marker body nil))) (defun nnweb-reference-search (search) (url-insert-file-contents --- 385,427 ---- (setq nnweb-articles (nreverse map)))))) (defun nnweb-reference-wash-article () ! (let ((case-fold-search t)) (goto-char (point-min)) ! (re-search-forward "^
" nil t) ! (forward-line -1) ! (let ((body (point-marker))) ! (search-forward "" nil t) ! (delete-region (point) (point-max)) ! (nnweb-remove-markup) (goto-char (point-min)) ! (while (looking-at " *$") ! (gnus-delete-line)) ! (narrow-to-region (point-min) body) ! (while (and (re-search-forward "^$" nil t) ! (not (eobp))) ! (gnus-delete-line)) (goto-char (point-min)) ! (while (looking-at "\\(^[^ ]+:\\) *") ! (replace-match "\\1 " t) ! (forward-line 1)) ! (goto-char (point-min)) ! (when (re-search-forward "^References:" nil t) ! (narrow-to-region ! (point) (if (re-search-forward "^$\\|^[^:]+:" nil t) ! (match-beginning 0) ! (point-max))) ! (goto-char (point-min)) ! (while (not (eobp)) ! (unless (looking-at "References") ! (insert "\t") ! (forward-line 1))) ! (goto-char (point-min)) ! (while (search-forward "," nil t) ! (replace-match " " t t))) ! (widen) ! (set-marker body nil)))) (defun nnweb-reference-search (search) (url-insert-file-contents *************** *** 454,460 **** (when (funcall (nnweb-definition 'search) nnweb-search) (let ((i 0) (more t) ! Subject Score Date Newsgroups From Message-ID map url) (while more ;; Go through all the article hits on this page. --- 464,471 ---- (when (funcall (nnweb-definition 'search) nnweb-search) (let ((i 0) (more t) ! (case-fold-search t) ! subject score date newsgroups from id map url) (while more ;; Go through all the article hits on this page. *************** *** 488,494 **** (defun nnweb-altavista-wash-article () (goto-char (point-min)) ! (let (subject) (when (re-search-forward "