From: Andrew G Cohen Date: Sat, 18 Dec 2021 22:11:50 +0000 (+0800) Subject: Fix gnus search by message-id X-Git-Tag: emacs-29.0.90~3577^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35da3ed05212e0222841becf614c109011f9ad80;p=emacs.git 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. --- diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 46dc1cf6c1f..d64c0cb90c3 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -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) diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el index 252e9f66838..0130f689991 100644 --- a/lisp/gnus/nnselect.el +++ b/lisp/gnus/nnselect.el @@ -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))))))