From: Andrew Cohen Date: Thu, 14 Jul 2011 14:19:53 +0000 (+0000) Subject: Merge changes made in Gnus trunk. X-Git-Tag: emacs-pretest-24.0.90~104^2~283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c1362863ddaadf0176c951b9bbdb24514dfb2f4;p=emacs.git Merge changes made in Gnus trunk. nnimap.el (nnimap-request-thread): Ensure search is performed in correct group. gnus-int.el (gnus-request-thread): Add group argument. gnus-sum.el (gnus-request-thread): Use it. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index f780cf7b9f0..7c887dc5450 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2011-07-14 Andrew Cohen + + * nnimap.el (nnimap-request-thread): Ensure search is performed in + correct group. + + * gnus-int.el (gnus-request-thread): Add group argument. + + * gnus-sum.el (gnus-request-thread): Use it. + 2011-07-10 Lars Magne Ingebrigtsen * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): `debbugs-*' diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index ef15a479892..b9b191cd09c 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -516,11 +516,12 @@ If BUFFER, insert the article in that group." article (gnus-group-real-name group) (nth 1 gnus-command-method) buffer))) -(defun gnus-request-thread (header) +(defun gnus-request-thread (header group) "Request the headers in the thread containing the article specified by HEADER." - (let ((gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name))) + (let ((gnus-command-method (gnus-find-method-for-group group))) (funcall (gnus-get-function gnus-command-method 'request-thread) - header))) + header + (gnus-group-real-name group)))) (defun gnus-warp-to-article () "Warps from an article in a virtual group to the article in its diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 798ae964460..5a817e12104 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -8970,7 +8970,7 @@ variable." 'list gnus-newsgroup-headers (if (gnus-check-backend-function 'request-thread gnus-newsgroup-name) - (gnus-request-thread header) + (gnus-request-thread header gnus-newsgroup-name) (let* ((last (if (numberp limit) (min (+ (mail-header-number header) limit) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 43a3cbd859d..ef5bee71629 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1565,8 +1565,9 @@ textual parts.") (declare-function gnus-fetch-headers "gnus-sum" (articles &optional limit force-new dependencies)) -(deffoo nnimap-request-thread (header) - (let* ((id (mail-header-id header)) +(deffoo nnimap-request-thread (header &optional group server) + (when (nnimap-possibly-change-group group server) + (let* ((id (mail-header-id header)) (refs (split-string (or (mail-header-references header) ""))) @@ -1584,7 +1585,7 @@ textual parts.") (gnus-fetch-headers (and (car result) (delete 0 (mapcar #'string-to-number (cdr (assoc "SEARCH" (cdr result)))))) - nil t)))) + nil t))))) (defun nnimap-possibly-change-group (group server) (let ((open-result t))