unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43356: Gnus: caching message headers? bug#43356
       [not found] <87v9flz99u.fsf@vollbio.de>
@ 2020-10-15 12:23 ` Madhu
  2020-10-16  5:21   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Madhu @ 2020-10-15 12:23 UTC (permalink / raw)
  To: ozhap; +Cc: help-gnu-emacs, 43356

[-- Attachment #1: Type: Text/Plain, Size: 130 bytes --]

ozhap thank you for asking lars to revert this!

Perhaps something like the following patch is enough? (I'd the default
to be t)


[-- Attachment #2: 0001-Fix-Don-t-eagerly-store-articles-in-the-Agent-by-def.patch --]
[-- Type: Text/X-Patch, Size: 2319 bytes --]

From ee8b4562de9073df3c52acf8e4e78d4536103630 Mon Sep 17 00:00:00 2001
From: Madhu <enometh@net.meer>
Date: Sun, 4 Oct 2020 14:24:06 +0530
Subject: [PATCH] Fix "Don't eagerly store articles in the Agent by default"

* lisp/gnus/gnus.el: (gnus-agent-eagerly-store-articles-by-default)
new variable. When gnus-agent is non-NIL and when reading an agentized
newsgroup, +automatically cache the article in the agent cache

* lisp/gnus/gnus-art.el: (gnus-request-article-this-buffer,
gnus-async-article-callback): use it.

fixes       def34a20766ea5179afd5e5ed090a2b86fcccb5e
which was
reverted in e2ece082732323738e56046a7bd667e5f9126ced

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39977
---
 lisp/gnus/gnus-art.el   | 1 +
 lisp/gnus/gnus-async.el | 1 +
 lisp/gnus/gnus.el       | 4 ++++
 3 files changed, 6 insertions(+)

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 1e9e459fe7..5fbb47fb75 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7095,6 +7095,7 @@ gnus-request-article-this-buffer
 		      (gnus-backlog-enter-article
 		       group article (current-buffer)))
 		    (when (and gnus-agent
+			       gnus-agent-eagerly-store-articles-by-default
 			       (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 e3e81c8bbc..fd5e5437cc 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -227,6 +227,7 @@ gnus-async-article-callback
 	  (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-by-default
 		     (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 cb534260a6..c93a15f01a 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -2285,6 +2285,10 @@ gnus-user-agent
     (gnus-message 1 "Edit your init file to make this change permanent.")
     (sit-for 2)))
 
+(defvar gnus-agent-eagerly-store-articles-by-default nil
+  "When gnus-agent is non-NIL and when reading an agentized newsgroup,
+automatically cache the article in the agent cache")
+
 \f
 ;;; Internal variables
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#43356: Gnus: caching message headers? bug#43356
  2020-10-15 12:23 ` bug#43356: Gnus: caching message headers? bug#43356 Madhu
@ 2020-10-16  5:21   ` Lars Ingebrigtsen
  2020-10-16  5:44     ` Drew Adams
  2020-10-17 10:09     ` Ozhap
  0 siblings, 2 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16  5:21 UTC (permalink / raw)
  To: Madhu; +Cc: ozhap, 43356, help-gnu-emacs

Madhu <enometh@meer.net> writes:

> Perhaps something like the following patch is enough? (I'd the default
> to be t)

Thanks; I applied it to Emacs 28 with some changes.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#43356: Gnus: caching message headers? bug#43356
  2020-10-16  5:21   ` Lars Ingebrigtsen
@ 2020-10-16  5:44     ` Drew Adams
  2020-10-17 10:09     ` Ozhap
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2020-10-16  5:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Madhu; +Cc: ozhap, 43356, help-gnu-emacs

Please don't post the same message to both the bug list and the help-gnu-emacs mailing list.  Thx.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#43356: Gnus: caching message headers? bug#43356
  2020-10-16  5:21   ` Lars Ingebrigtsen
  2020-10-16  5:44     ` Drew Adams
@ 2020-10-17 10:09     ` Ozhap
  1 sibling, 0 replies; 4+ messages in thread
From: Ozhap @ 2020-10-17 10:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Madhu, 43356

Lars Ingebrigtsen wrote:

> Thanks; I applied it to Emacs 28 with some changes.

Thank you all!

Madhu wrote:

> (I'd the default to be t)

I think I understand why: people could be using it that way already. But
keeping it nil could make correcting the documentation inconsistencies I
mentioned easier: one would merely have to add the new option to a
couple of those sections without much rewriting...

--





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-17 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87v9flz99u.fsf@vollbio.de>
2020-10-15 12:23 ` bug#43356: Gnus: caching message headers? bug#43356 Madhu
2020-10-16  5:21   ` Lars Ingebrigtsen
2020-10-16  5:44     ` Drew Adams
2020-10-17 10:09     ` Ozhap

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).