*** A new mail-to-news backend makes it possible to post
even when the NNTP server doesn't allow posting.
-*** A new backend for reading searches from DejaNews has
-been added.
+*** A new backend for reading searches from Web search engines
+(DejaNews, Alta Vista, InReference) has been added.
Use the `G n' command in the group buffer to create such
a group.
+Tue Aug 27 00:36:58 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * gnus-topic.el (gnus-topic-set-parameters): Bugout.
+
+Mon Aug 26 22:41:04 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * nntp.el (nntp-retrieve-groups): Didn't inhibit erasing.
+
+ * nnweb.el (nnweb-callback): Ignore if the callback buffer is
+ dead.
+
+ * gnus-async.el (gnus-async-prefetch-article): Don't do anything
+ if Gnus is dead.
+
+Mon Aug 26 00:57:06 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * nnweb.el (nnweb-dejanews-create-mapping): Fold search.
+ (nnweb-reference-create-mapping): Ditto.
+ (nnweb-altavista-create-mapping): Ditto.
+
+ * gnus-async.el (gnus-asynchronous): New variable.
+ (gnus-async-prefetch-article): Use it.
+ (gnus-async-prefetch-headers): Ditto.
+
+ * nnweb.el (nnweb-close-group): New function.
+
+ * gnus-topic.el (gnus-topic-clean-alist): Would remove foreign
+ groups from topics.
+
+Mon Aug 26 00:10:40 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * gnus.el: Red Gnus v0.15 is released.
+
Sun Aug 25 23:09:18 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
* message.el (message-send-mail-with-qmail): Use
(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;
(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))))
+ (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))
+ (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))))))))
+ (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."
(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)))
"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)
;; 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)
(defvar gnus-score-file-list nil)
(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)))
+ (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."
(let ((topic-name (pop topic))
group filtered-topic)
(while (setq group (pop topic))
- (if (and (gnus-gethash group gnus-active-hashtb)
+ (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)))
(eval '(run-hooks 'gnus-load-hook))
-(defconst gnus-version-number "0.15"
+(defconst gnus-version-number "0.16"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Red Gnus v%s" gnus-version-number)
(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.
(nnheader-insert
"211 %d %d %d %s\n" (length nnweb-articles)
(caar nnweb-articles) (caar (last nnweb-articles))
- group))))
+ 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)
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))
+ (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")
(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)
+ ;(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
(setq nnweb-articles (nreverse map))))))
(defun nnweb-dejanews-wash-article ()
- (goto-char (point-min))
- (re-search-forward "<PRE>" nil t)
- (delete-region (point-min) (point))
- (re-search-forward "</PRE>" 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)))
+ (let ((case-fold-search t))
+ (goto-char (point-min))
+ (re-search-forward "<PRE>" nil t)
+ (delete-region (point-min) (point))
+ (re-search-forward "</PRE>" 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
(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
(setq nnweb-articles (nreverse map))))))
(defun nnweb-reference-wash-article ()
- (goto-char (point-min))
- (re-search-forward "^</center><hr>" nil t)
- (delete-region (point-min) (point))
- (search-forward "<pre>" nil t)
- (forward-line -1)
- (let ((body (point-marker)))
- (search-forward "</pre>" 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))
+ (let ((case-fold-search t))
(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)))
+ (re-search-forward "^</center><hr>" nil t)
+ (delete-region (point-min) (point))
+ (search-forward "<pre>" nil t)
+ (forward-line -1)
+ (let ((body (point-marker)))
+ (search-forward "</pre>" 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 (not (eobp))
- (unless (looking-at "References")
- (insert "\t")
- (forward-line 1)))
+ (while (looking-at "\\(^[^ ]+:\\) *")
+ (replace-match "\\1 " t)
+ (forward-line 1))
(goto-char (point-min))
- (while (search-forward "," nil t)
- (replace-match " " t t)))
- (widen)
- (set-marker body nil)))
+ (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
(when (funcall (nnweb-definition 'search) nnweb-search)
(let ((i 0)
(more t)
- Subject Score Date Newsgroups From Message-ID
+ (case-fold-search t)
+ subject score date newsgroups from id
map url)
(while more
;; Go through all the article hits on this page.
(defun nnweb-altavista-wash-article ()
(goto-char (point-min))
- (let (subject)
+ (let ((case-fold-search t)
+ subject)
(when (re-search-forward "<H1>\\(.*\\)</H1>" nil t)
(setq subject (match-string 1)))
(re-search-forward "^<strong>" nil t)
+Mon Aug 26 18:29:23 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.texi (Optional Backend Functions): Deletia.
+ (Asynchronous Fetching): Deletia and addition.
+
Sun Aug 25 23:39:03 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
* gnus.texi: Include the version number.
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Red Gnus 0.15 Manual
+@settitle Red Gnus 0.16 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Red Gnus 0.15 Manual
+@title Red Gnus 0.16 Manual
@author by Lars Magne Ingebrigtsen
@page
network latencies may make reading articles a chore. You have to wait
for a while after pressing @kbd{n} to go to the next article before the
article appears. Why can't Gnus just go ahead and fetch the article
-while you are reading the previous one? Why not, indeed.
+while you are reading the previous one? Why not, indeed.
First, some caveats. There are some pitfalls to using asynchronous
article fetching, especially the way Gnus does it.
Here's how: Set @code{gnus-asynchronous} to @code{t}. The rest should
happen automatically.
-@vindex nntp-async-number
+@vindex gnus-use-article-prefetch
You can control how many articles that are to be pre-fetched by setting
-@code{nntp-async-number}. This is five by default, which means that when
-you read an article in the group, @code{nntp} will pre-fetch the next
-five articles. If this variable is @code{t}, @code{nntp} will pre-fetch
-all the articles that it can without bound. If it is @code{nil}, no
-pre-fetching will be made.
-
-@vindex gnus-asynchronous-article-function
-You may wish to create some sort of scheme for choosing which articles
-that @code{nntp} should consider as candidates for pre-fetching. For
-instance, you may wish to pre-fetch all articles with high scores, and
-not pre-fetch low-scored articles. You can do that by setting the
-@code{gnus-asynchronous-article-function}, which will be called with an
-alist where the keys are the article numbers. Your function should
-return an alist where the articles you are not interested in have been
-removed. You could also do sorting on article score and the like.
+@code{gnus-use-article-prefetch}. This is 30 by default, which means
+that when you read an article in the group, the backend will pre-fetch
+the next 30 articles. If this variable is @code{t}, the backend will
+pre-fetch all the articles that it can without bound. If it is
+@code{nil}, no pre-fetching will be made.
+
+@vindex gnus-prefetched-article-deletion-strategy
+Articles have to be removed from the asynch buffer sooner or later. The
+@code{gnus-prefetched-article-deletion-strategy} says when to remove
+articles. This is a list that may contain the following elements:
+
+@table @code
+@item read
+Remove articles when they are read.
+
+@item exit
+Remove articles when exiting the group.
+@end table
+
+The default value is @code{(read exit)}.
+
+@vindex gnus-use-header-prefetch
+If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
+from the next group.
@node Article Caching
@vindex nntp-prepare-server-hook
A hook run before attempting to connect to an @sc{nntp} server.
-@item nntp-async-number
-@vindex nntp-async-number
-How many articles should be pre-fetched when in asynchronous mode. If
-this variable is @code{t}, @code{nntp} will pre-fetch all the articles
-that it can without bound. If it is @code{nil}, no pre-fetching will be
-made.
-
@item nntp-warn-about-losing-connection
@vindex nntp-warn-about-losing-connection
If this variable is non-@code{nil}, some noise will be made when a
There should be no result data from this function.
-@item (nnchoke-request-asynchronous GROUP &optional SERVER ARTICLES)
-
-This is a request to fetch articles asynchronously later.
-@var{articles} is an alist of @var{(article-number line-number)}. One
-would generally expect that if one later fetches article number 4, for
-instance, some sort of asynchronous fetching of the articles after 4
-(which might be 5, 6, 7 or 11, 3, 909 depending on the order in that
-alist) would be fetched asynchronously, but that is left up to the
-backend. Gnus doesn't care.
-
-There should be no result data from this function.
-
-
@item (nnchoke-request-group-description GROUP &optional SERVER)
The result data from this function should be a description of