From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#48801: 28.0.50; [PATCH] Feature suggestion gnus-retrieve-headers check for nov-is-evil when agent is enabled Date: Sun, 06 Jun 2021 10:51:56 -0700 Message-ID: References: <87im2v9y4u.fsf@gnus.org> <874kee0y6l.fsf@gnus.org> <87zgw3tjvd.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35928"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: 48801@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 06 19:53:15 2021 Return-path: Envelope-to: geb-bug-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 1lpwxW-000989-Sq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 19:53:14 +0200 Original-Received: from localhost ([::1]:48272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpwxV-00004x-T3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 13:53:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpwxL-0008Se-47 for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 13:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpwxK-00045w-D1 for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 13:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpwxK-0001KZ-Cd for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 13:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jun 2021 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48801-submit@debbugs.gnu.org id=B48801.16230019285033 (code B ref 48801); Sun, 06 Jun 2021 17:53:02 +0000 Original-Received: (at 48801) by debbugs.gnu.org; 6 Jun 2021 17:52:08 +0000 Original-Received: from localhost ([127.0.0.1]:53822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpwwO-0001J4-Iw for submit@debbugs.gnu.org; Sun, 06 Jun 2021 13:52:08 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:43377 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpwwJ-0001Ib-TG for 48801@debbugs.gnu.org; Sun, 06 Jun 2021 13:52:04 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:d100:fa67:1f2e:5d5e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4FykbK01Vvz3pkmh; Sun, 6 Jun 2021 10:51:56 -0700 (PDT) In-Reply-To: <87zgw3tjvd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Jun 2021 11:36:38 +0200") Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208141 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Alex Bochannek writes: > >> What I am trying to achieve is: >> >> - Allow limiting and scoring by newsgroup name in an nnvirtual group >> - Still use caching and agent mode for the nnvirtual and constituent >> groups >> >> For the second part I simply set `gnus-agent-cache' to non-nil and add >> the constituent groups to the agent. I didn't see a need to add the >> virtual group to the agent, because as long as all constituent groups >> are, I still get caching and agent mode. > > Hm... Am I misreading the patch, then? This bit: > > ((and gnus-agent (gnus-online gnus-command-method) > - (gnus-agent-method-p gnus-command-method)) > + (gnus-agent-method-p gnus-command-method) > + (not gnus-nov-is-evil) > .. > (gnus-agent-retrieve-headers articles group fetch-old)) > > seems to disable the agent then gnus-nov-is-evil is set? The scenario in which this change applies is when the agent is plugged and when the group is in an agent category. In the case where the nnvirtual is not in the agent, but the constituent groups are, I want to not use NOV so I can get the extra headers. I think your concern is that when `gnus-nov-is-evil' is set globally, it will effectively disable the agent for everything? Maybe this logic should reside in `gnus-agent-retrieve-headers' instead? To address the unbound nov-is-evil for nnvirtual issue, this would work. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 01053797b3..3fe69ec471 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -522,12 +522,18 @@ gnus-close-group (defun gnus-retrieve-headers (articles group &optional fetch-old) "Request headers for ARTICLES in GROUP. If FETCH-OLD, retrieve all headers (or some subset thereof) in the group." - (let ((gnus-command-method (gnus-find-method-for-group group))) + (let* ((gnus-command-method (gnus-find-method-for-group group)) + (gnus-method-nov-is-evil (intern + (format "%s-nov-is-evil" + (car gnus-command-method))))) (cond ((and gnus-use-cache (numberp (car articles))) (gnus-cache-retrieve-headers articles group fetch-old)) ((and gnus-agent (gnus-online gnus-command-method) - (gnus-agent-method-p gnus-command-method)) + (gnus-agent-method-p gnus-command-method) + (not gnus-nov-is-evil) + (not (and (boundp gnus-method-nov-is-evil) + (symbol-value gnus-method-nov-is-evil)))) (gnus-agent-retrieve-headers articles group fetch-old)) (t (funcall (gnus-get-function gnus-command-method 'retrieve-headers) --=-=-= Content-Type: text/plain >> P.S.: Is there a better place to discuss this? gmane.emacs.gnus.general? > > Sure, but it's very low volume these days, so there's probably not that > many more people reading that group than the bug list. :-/ That's unfortunate, I'll stick to the bugs list then. -- Alex. --=-=-=--