all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Gnus: caching message headers?
@ 2020-10-08  3:28 Ozhap
  2020-10-15 12:23 ` bug#43356: Gnus: caching message headers? bug#43356 Madhu
  2020-10-15 12:23 ` Madhu
  0 siblings, 2 replies; 7+ messages in thread
From: Ozhap @ 2020-10-08  3:28 UTC (permalink / raw)
  To: enometh; +Cc: help-gnu-emacs

Ozhap wrote:

>> But probably there should be a new hook. Or of course, reverting it and
>> rewriting the manual instead.
>
> An easier way would be to use gnus-agent-store-article instead of
> gnus-agent-fetch-articles (which is designed for many messages) in
> gnus-agent-fetch-selected-article. Please open a bug report so that we
> can fix it there.

That should read: Check for stored article as in
gnus-agent-store-article in -agent-fetch-selected-article, before
fetching. Well, the previous code (or a new hook) seems better :|



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

* bug#43356: Gnus: caching message headers? bug#43356
  2020-10-08  3:28 Gnus: caching message headers? Ozhap
@ 2020-10-15 12:23 ` Madhu
  2020-10-16  5:21   ` Lars Ingebrigtsen
  2020-10-15 12:23 ` Madhu
  1 sibling, 1 reply; 7+ 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] 7+ messages in thread

* Re: Gnus: caching message headers? bug#43356
  2020-10-08  3:28 Gnus: caching message headers? Ozhap
  2020-10-15 12:23 ` bug#43356: Gnus: caching message headers? bug#43356 Madhu
@ 2020-10-15 12:23 ` Madhu
  1 sibling, 0 replies; 7+ 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] 7+ 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
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ 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] 7+ 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-16  5:44     ` Drew Adams
  2020-10-17 10:09     ` Ozhap
  2 siblings, 0 replies; 7+ 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] 7+ messages in thread

* RE: bug#43356: Gnus: caching message headers? bug#43356
  2020-10-16  5:21   ` Lars Ingebrigtsen
  2020-10-16  5:44     ` Drew Adams
@ 2020-10-16  5:44     ` Drew Adams
  2020-10-17 10:09     ` Ozhap
  2 siblings, 0 replies; 7+ 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] 7+ 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-16  5:44     ` Drew Adams
@ 2020-10-17 10:09     ` Ozhap
  2 siblings, 0 replies; 7+ 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] 7+ messages in thread

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-08  3:28 Gnus: caching message headers? Ozhap
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-16  5:44     ` Drew Adams
2020-10-17 10:09     ` Ozhap
2020-10-15 12:23 ` Madhu

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.