From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.help Subject: Re: Gnus: caching message headers? bug#43356 Date: Thu, 15 Oct 2020 17:53:23 +0530 (IST) Message-ID: <20201015.175323.2212388384146456594.enometh@meer.net> References: <87v9flz99u.fsf@vollbio.de> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Oct_15_17_53_23_2020_601)--" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22531"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, 43356@debbugs.gnu.org To: ozhap@vollbio.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 15 14:23:54 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kT2IU-0005lO-2P for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 14:23:54 +0200 Original-Received: from localhost ([::1]:49162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT2IT-0007z6-4Z for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 08:23:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT2IA-0007yk-5s for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 08:23:34 -0400 Original-Received: from smtp6.ctinetworks.com ([205.166.61.199]:34582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT2I8-0007BA-HB for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 08:23:33 -0400 Original-Received: from localhost (unknown [117.254.34.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp6.ctinetworks.com (Postfix) with ESMTPSA id BD172843EE; Thu, 15 Oct 2020 08:23:21 -0400 (EDT) In-Reply-To: <87v9flz99u.fsf@vollbio.de> X-Mailer: Mew version 6.8 on Emacs 28.0 X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: BD172843EE.A7D29 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Watermark: 1603628607.75233@XDD4WhSD6aSV96dS9U0Z4g Received-SPF: pass client-ip=205.166.61.199; envelope-from=enometh@meer.net; helo=smtp6.ctinetworks.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 08:23:28 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124467 Archived-At: ----Next_Part(Thu_Oct_15_17_53_23_2020_601)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit ozhap thank you for asking lars to revert this! Perhaps something like the following patch is enough? (I'd the default to be t) ----Next_Part(Thu_Oct_15_17_53_23_2020_601)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-Fix-Don-t-eagerly-store-articles-in-the-Agent-by-def.patch" >From ee8b4562de9073df3c52acf8e4e78d4536103630 Mon Sep 17 00:00:00 2001 From: Madhu 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") + ;;; Internal variables -- 2.25.1 ----Next_Part(Thu_Oct_15_17_53_23_2020_601)----