emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e2ece08 1/3: Revert "Don't eagerly store articles in the Agent by


From: Lars Ingebrigtsen
Subject: master e2ece08 1/3: Revert "Don't eagerly store articles in the Agent by default"
Date: Fri, 9 Oct 2020 00:49:01 -0400 (EDT)

branch: master
commit e2ece082732323738e56046a7bd667e5f9126ced
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Revert "Don't eagerly store articles in the Agent by default"
    
    This reverts commit def34a20766ea5179afd5e5ed090a2b86fcccb5e.
    
    This made storing articles in the Agent very slow.
---
 lisp/gnus/gnus-agent.el | 1 -
 lisp/gnus/gnus-art.el   | 5 ++++-
 lisp/gnus/gnus-async.el | 6 ++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index f748996..6a7e81b 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -3812,7 +3812,6 @@ has been fetched."
         t))))
 
 (defun gnus-agent-store-article (article group)
-  (declare (obsolete nil "28.1"))
   (let* ((gnus-command-method (gnus-find-method-for-group group))
         (file (gnus-agent-article-name (number-to-string article) group))
         (file-name-coding-system nnmail-pathname-coding-system)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index b114792..2d9d5ec 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7092,7 +7092,10 @@ If given a prefix, show the hidden text instead."
                                              gnus-summary-buffer)
                    (when gnus-keep-backlog
                      (gnus-backlog-enter-article
-                      group article (current-buffer))))
+                      group article (current-buffer)))
+                   (when (and gnus-agent
+                              (gnus-agent-group-covered-p group))
+                     (gnus-agent-store-article article group)))
                  (setq result 'article))
                 (methods
                  (setq gnus-override-method (pop methods)))
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el
index 9bcb6c3..e3e81c8 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -225,6 +225,12 @@ that was fetched."
       (save-excursion
        (save-restriction
          (narrow-to-region mark (point-max))
+         ;; Put the articles into the agent, if they aren't already.
+         (when (and gnus-agent
+                    (gnus-agent-group-covered-p group))
+           (save-restriction
+             (narrow-to-region mark (point-max))
+             (gnus-agent-store-article article group)))
          ;; Prefetch images for the groups that want that.
          (when (fboundp 'gnus-html-prefetch-images)
            (gnus-html-prefetch-images summary))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]