summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-10-16 07:21:05 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-10-16 07:21:05 +0200
commit41d220dc6085cb8cd96cfcf65248eb83015c1b90 (patch)
treeee71ce13d43191588e3abccff364b800861fc470 /lisp/gnus
parent7e3a95d8fd0ced4a75edea7b14b3038b1997d516 (diff)
downloademacs-41d220dc6085cb8cd96cfcf65248eb83015c1b90.tar.gz
emacs-41d220dc6085cb8cd96cfcf65248eb83015c1b90.tar.bz2
emacs-41d220dc6085cb8cd96cfcf65248eb83015c1b90.zip
Add a new variable to control Gnus Agent caching
* doc/misc/gnus.texi (Agent Variables): Document it. * lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Ditto. * lisp/gnus/gnus-async.el (gnus-async-article-callback): Use it. * lisp/gnus/gnus.el (gnus-agent-eagerly-store-articles): New variable. Includes work from Madhu <enometh@meer.net>.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/gnus-art.el1
-rw-r--r--lisp/gnus/gnus-async.el1
-rw-r--r--lisp/gnus/gnus.el8
3 files changed, 10 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 2d9d5ece01a..2e9d85e39d8 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7094,6 +7094,7 @@ If given a prefix, show the hidden text instead."
(gnus-backlog-enter-article
group article (current-buffer)))
(when (and gnus-agent
+ gnus-agent-eagerly-store-articles
(gnus-agent-group-covered-p group))
(gnus-agent-store-article article group)))
(setq result 'article))
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el
index e3e81c8bbce..9b08e6a0ef8 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -227,6 +227,7 @@ that was fetched."
(narrow-to-region mark (point-max))
;; Put the articles into the agent, if they aren't already.
(when (and gnus-agent
+ gnus-agent-eagerly-store-articles
(gnus-agent-group-covered-p group))
(save-restriction
(narrow-to-region mark (point-max))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index cb534260a65..c1cfddc87b3 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -2285,6 +2285,14 @@ a string, be sure to use a valid format, see RFC 2616."
(gnus-message 1 "Edit your init file to make this change permanent.")
(sit-for 2)))
+(defcustom gnus-agent-eagerly-store-articles t
+ "If non-nil, cache articles eagerly.
+
+When using the Gnus Agent and reading an agentized newsgroup,
+automatically cache the article in the agent cache."
+ :type 'boolean
+ :version "28.1")
+
;;; Internal variables