[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 41d220d: Add a new variable to control Gnus Agent caching
From: |
Lars Ingebrigtsen |
Subject: |
master 41d220d: Add a new variable to control Gnus Agent caching |
Date: |
Fri, 16 Oct 2020 01:21:15 -0400 (EDT) |
branch: master
commit 41d220dc6085cb8cd96cfcf65248eb83015c1b90
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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>.
---
doc/misc/gnus.texi | 5 +++++
etc/NEWS | 5 +++++
lisp/gnus/gnus-art.el | 1 +
lisp/gnus/gnus-async.el | 1 +
lisp/gnus/gnus.el | 8 ++++++++
5 files changed, 20 insertions(+)
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index f356dfe..3f893e9 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -19489,6 +19489,11 @@ Variable to control whether use the locally stored
@acronym{NOV} and
articles when plugged, e.g., essentially using the Agent as a cache.
The default is non-@code{nil}, which means to use the Agent as a cache.
+@item gnus-agent-eagerly-store-articles
+@vindex gnus-agent-eagerly-store-articles
+If non-@code{nil} (which is the default), store all articles read in
+agentized groups in the Agent cache.
+
@item gnus-agent-go-online
@vindex gnus-agent-go-online
If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
diff --git a/etc/NEWS b/etc/NEWS
index 2a75e13..1838b6b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -435,6 +435,11 @@ tags to be considered as well.
** Gnus
+++
+*** New user option 'gnus-agent-eagerly-store-articles'.
+If non-nil (which is the default), the Gnus Agent will store all read
+articles in the Agent cache.
+
++++
*** New user option 'gnus-global-groups'.
Gnus handles private groups differently from public (i.e., NNTP-like)
groups. Most importantly, Gnus doesn't download external images from
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 2d9d5ec..2e9d85e 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 e3e81c8..9b08e6a 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 cb53426..c1cfddc 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 41d220d: Add a new variable to control Gnus Agent caching,
Lars Ingebrigtsen <=