1 |
;;; gnus-async.el --- asynchronous support for Gnus |
;;; gnus-async.el --- asynchronous support for Gnus |
2 |
;; Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003 |
3 |
|
;; Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
6 |
;; Keywords: news |
;; Keywords: news |
36 |
"Support for asynchronous operations." |
"Support for asynchronous operations." |
37 |
:group 'gnus) |
:group 'gnus) |
38 |
|
|
|
(defcustom gnus-asynchronous nil |
|
|
"*If nil, inhibit all Gnus asynchronicity. |
|
|
If non-nil, let the other asynch variables be heeded." |
|
|
:group 'gnus-asynchronous |
|
|
:type 'boolean) |
|
|
|
|
39 |
(defcustom gnus-use-article-prefetch 30 |
(defcustom gnus-use-article-prefetch 30 |
40 |
"*If non-nil, prefetch articles in groups that allow this. |
"*If non-nil, prefetch articles in groups that allow this. |
41 |
If a number, prefetch only that many articles forward; |
If a number, prefetch only that many articles forward; |
45 |
(const :tag "all" t) |
(const :tag "all" t) |
46 |
(integer :tag "some" 0))) |
(integer :tag "some" 0))) |
47 |
|
|
48 |
|
(defcustom gnus-asynchronous nil |
49 |
|
"*If nil, inhibit all Gnus asynchronicity. |
50 |
|
If non-nil, let the other asynch variables be heeded." |
51 |
|
:group 'gnus-asynchronous |
52 |
|
:type 'boolean) |
53 |
|
|
54 |
(defcustom gnus-prefetched-article-deletion-strategy '(read exit) |
(defcustom gnus-prefetched-article-deletion-strategy '(read exit) |
55 |
"List of symbols that say when to remove articles from the prefetch buffer. |
"List of symbols that say when to remove articles from the prefetch buffer. |
56 |
Possible values in this list are `read', which means that |
Possible values in this list are `read', which means that |
277 |
;; needs to be done in nntp.el. |
;; needs to be done in nntp.el. |
278 |
(while (eq article gnus-async-current-prefetch-article) |
(while (eq article gnus-async-current-prefetch-article) |
279 |
(incf tries) |
(incf tries) |
280 |
(when (nntp-accept-process-output proc 1) |
(when (nntp-accept-process-output proc) |
281 |
(setq tries 0)) |
(setq tries 0)) |
282 |
(when (and (not nntp-have-messaged) (eq 3 tries)) |
(when (and (not nntp-have-messaged) |
283 |
|
(= tries 3)) |
284 |
(gnus-message 5 "Waiting for async article...") |
(gnus-message 5 "Waiting for async article...") |
285 |
(setq nntp-have-messaged t))) |
(setq nntp-have-messaged t))) |
286 |
(quit |
(quit |
287 |
;; if the user interrupted on a slow/hung connection, |
;; if the user interrupted on a slow/hung connection, |
288 |
;; do something friendly. |
;; do something friendly. |
289 |
(when (< 3 tries) |
(when (> tries 3) |
290 |
(setq gnus-async-current-prefetch-article nil)) |
(setq gnus-async-current-prefetch-article nil)) |
291 |
(signal 'quit nil))) |
(signal 'quit nil))) |
292 |
(when nntp-have-messaged |
(when nntp-have-messaged |