GNU bug report logs - #48801
28.0.50; [PATCH] Feature suggestion gnus-retrieve-headers check for nov-is-evil when agent is enabled

Previous Next

Package: emacs;

Reported by: Alex Bochannek <alex <at> bochannek.com>

Date: Wed, 2 Jun 2021 21:15:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [PATCH] Feature suggestion gnus-retrieve-headers check for
 nov-is-evil when agent is enabled
Date: Wed, 02 Jun 2021 14:13:21 -0700
[Message part 1 (text/plain, inline)]
Hello!

I am trying to solve the following problem: Using nnvirtual groups that
are made up of several nntp newsgroups I would like to limit by
`Newsgroups' when in the nnvirtual. From reading the code, it appears
that this means I cannot use NOV because then the extra headers list
won't be generated. I can set `nov-is-evil' and this works. Except when
I am also using agent mode, in which case it will always use the NOV.

The below patch is a work in progress and doesn't entirely work yet, but
I wanted to share it early before I spend more time on it.

The following questions have come up for me:

1) Is there a different way to solve this problem? Specifically, is
there a better way to limit by newsgroup when in an nnvirtual group?
2) Is it possible to set `nntp-nov-is-evil' as a group parameter? It
looks like header retrieval may be too early for this and I may need to
use a hook?
3) How would this approach interact with the local cache? I have not
looked at this path yet.

Thanks!
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index 01053797b3..d2d7fd55ae 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -527,7 +527,11 @@ gnus-retrieve-headers
      ((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 (symbol-value
+		 (intern
+		  (format "%s-nov-is-evil" (car gnus-command-method))))))
       (gnus-agent-retrieve-headers articles group fetch-old))
      (t
       (funcall (gnus-get-function gnus-command-method 'retrieve-headers)
[Message part 3 (text/plain, inline)]
-- 
Alex.

This bug report was last modified 3 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.