summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-search.el
diff options
context:
space:
mode:
authorAndrew G Cohen <cohen@andy.bu.edu>2023-03-30 10:11:06 +0800
committerAndrew G Cohen <cohen@andy.bu.edu>2023-04-15 08:21:39 +0800
commit234be3d670cf04503a81f74617239f62364457ae (patch)
tree82d8f37be89304898a3fed956c8358e297a09e63 /lisp/gnus/gnus-search.el
parentbf986c1faf53f3abd260f72cb36d9143afac353d (diff)
downloademacs-234be3d670cf04503a81f74617239f62364457ae.tar.gz
Fix errors when nnselect-always-regenerate is t (bug#61539)
The group parameter nnselect-always-regenerate causes the list of articles in the group to be generated each time it is needed. For this to work reliably the list of articles has to be generated at the appropriate time and to have a reproducible ordering. * lisp/gnus/gnus-search.el (gnus-search-run-search): For nnselect groups if the article list has not been stored, regenerate it. * lisp/gnus/nnselect.el (nnselect-generate-artlist): Sort the generated list of articles by RSV, group, and number. Store the artlist after generation. When the new optional argument INFO is non-nil, update the group info. (nnselect-compress-artlist, nnselect-uncompress-artlist): Preserve the article list ordering. (nnselect-get-artlist): Return nil when nnselect-always-regenerate is t. (nnselect-store-artlist): Store the group active range along with the artlist. Don't keep the artlist if nnselect-always-regenerate is t. (nnselect-request-group): The full article list isn't needed at this stage, only the active range. (nnselect-retrieve-headers): Regenerate the article list if there is no stored value. Inhibit gnus-demon while retrieving headers. (nnselect-request-group-scan): Don't generate the article list when nnselect-always-regenerate is t since it will be generated again later on. (nnselect-request-create-group): Allow the artlist to be passed as an argument to the function. Update the group info and store the artlist.
Diffstat (limited to 'lisp/gnus/gnus-search.el')
-rw-r--r--lisp/gnus/gnus-search.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 71980afa0ff..12d9dacf132 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1066,7 +1066,9 @@ Responsible for handling and, or, and parenthetical expressions.")
_srv query-spec groups)
(let ((artlist []))
(dolist (group groups)
- (let* ((gnus-newsgroup-selection (nnselect-get-artlist group))
+ (let* ((gnus-newsgroup-selection
+ (or
+ (nnselect-get-artlist group) (nnselect-generate-artlist group)))
(group-spec
(nnselect-categorize
(mapcar 'car