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
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Alex Bochannek <alex <at> bochannek.com> 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.
[Message part 2 (text/x-patch, 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)
[Message part 3 (text/plain, inline)]
>> 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.
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.