unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48801: 28.0.50; [PATCH] Feature suggestion gnus-retrieve-headers check for nov-is-evil when agent is enabled
@ 2021-06-02 21:13 Alex Bochannek
  2021-06-03  7:59 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 18+ messages in thread
From: Alex Bochannek @ 2021-06-02 21:13 UTC (permalink / raw)
  To: 48801

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

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!

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 733 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 10 bytes --]

-- 
Alex.

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

end of thread, other threads:[~2021-06-12 17:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 21:13 bug#48801: 28.0.50; [PATCH] Feature suggestion gnus-retrieve-headers check for nov-is-evil when agent is enabled Alex Bochannek
2021-06-03  7:59 ` Lars Ingebrigtsen
2021-06-03 18:01   ` Alex Bochannek
2021-06-04  9:35     ` Lars Ingebrigtsen
2021-06-04 17:40       ` Alex Bochannek
2021-06-06  9:36         ` Lars Ingebrigtsen
2021-06-06 17:51           ` Alex Bochannek
2021-06-08  9:57             ` Lars Ingebrigtsen
2021-06-08 15:50               ` Alex Bochannek
2021-06-09  5:35               ` Alex Bochannek
2021-06-09  9:59                 ` Lars Ingebrigtsen
2021-06-09 18:05                   ` Alex Bochannek
2021-06-09 18:14                     ` Eli Zaretskii
2021-06-09 18:47                       ` Alex Bochannek
2021-06-09 18:55                         ` Eli Zaretskii
2021-06-09 19:04                           ` Alex Bochannek
2021-06-12 12:10                         ` Lars Ingebrigtsen
2021-06-12 17:49                           ` Alex Bochannek

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).