Fix gnus search by message-id

* lisp/gnus/gnus-search.el (gnus-search-run-search): Continue
iterating until a match is found.

* lisp/gnus/nnselect.el (nnselect-request-article): Use new
gnus-search query format.
This commit is contained in:
Andrew G Cohen 2021-12-19 06:11:50 +08:00
parent f315d31216
commit 35da3ed052
2 changed files with 3 additions and 4 deletions

View file

@ -1060,7 +1060,7 @@ Responsible for handling and, or, and parenthetical expressions.")
q-string)))
(while (and (setq group (pop grouplist))
(or (null single-search) (null artlist)))
(or (null single-search) (= 0 (length artlist))))
(when (nnimap-change-group
(gnus-group-short-name group) server)
(with-current-buffer (nnimap-buffer)

View file

@ -395,8 +395,7 @@ If this variable is nil, or if the provided function returns nil,
(gnus-search-run-query
(list
(cons 'search-query-spec
(list (cons 'query `((id . ,article)))
(cons 'criteria "") (cons 'shortcut t)))
(list (cons 'query (format "id:%s" article))))
(cons 'search-group-spec servers))))
(unless (zerop (nnselect-artlist-length artlist))
(setq
@ -905,7 +904,7 @@ article came from is also searched."
;; make sure
(setq list
(sort (map-merge
'list list
'alist list
(alist-get type (gnus-info-marks group-info)))
(lambda (elt1 elt2)
(< (car elt1) (car elt2))))))