summaryrefslogtreecommitdiff
path: root/lisp/gnus/nnimap.el
diff options
context:
space:
mode:
authorAndrew Cohen <cohen@andy.bu.edu>2011-07-24 00:19:29 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-07-24 00:19:29 +0000
commit47f0b35ef3d1ac82846ba6e641ad783e0f378a6a (patch)
tree0ba9be026b6370319946b904549fbf4ddbf39118 /lisp/gnus/nnimap.el
parent04c4b52e0ae4de02a3d961857906f8a35133ca36 (diff)
downloademacs-47f0b35ef3d1ac82846ba6e641ad783e0f378a6a.tar.gz
Merge changes made in Gnus trunk.
nnir.el (nnir-search-thread): New function to make an nnir group based on a thread query. gnus-sum.el (gnus-refer-thread-use-nnir): New variable to control use of nnir in thread referral. (gnus-summary-refer-thread): Use it. nnimap.el (nnimap-request-thread): Use it.
Diffstat (limited to 'lisp/gnus/nnimap.el')
-rw-r--r--lisp/gnus/nnimap.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 385522759b6..8a0d635ef7b 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1566,15 +1566,17 @@ textual parts.")
(articles &optional limit force-new dependencies))
(deffoo nnimap-request-thread (header &optional group server)
- (when (nnimap-possibly-change-group group server)
- (let* ((cmd (nnimap-make-thread-query header))
- (result (with-current-buffer (nnimap-buffer)
- (nnimap-command "UID SEARCH %s" cmd))))
- (when result
- (gnus-fetch-headers
- (and (car result) (delete 0 (mapcar #'string-to-number
- (cdr (assoc "SEARCH" (cdr result))))))
- nil t)))))
+ (if gnus-refer-thread-use-nnir
+ (nnir-search-thread header)
+ (when (nnimap-possibly-change-group group server)
+ (let* ((cmd (nnimap-make-thread-query header))
+ (result (with-current-buffer (nnimap-buffer)
+ (nnimap-command "UID SEARCH %s" cmd))))
+ (when result
+ (gnus-fetch-headers
+ (and (car result) (delete 0 (mapcar #'string-to-number
+ (cdr (assoc "SEARCH" (cdr result))))))
+ nil t))))))
(defun nnimap-possibly-change-group (group server)
(let ((open-result t))