(nnir-retrieve-headers): Bind gnus-override-method before calling
authorAndreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
Thu, 8 Jun 2006 05:40:50 +0000 (05:40 +0000)
committerAndreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
Thu, 8 Jun 2006 05:40:50 +0000 (05:40 +0000)
gnus-retrieve-headers.  If we hit a group that isn't in
gnus-newsrc-hashtb, gnus-find-method-for-group invented a new
select method with empty parameters, possibly corrupting
gnus-server-method-cache on the next call to
gnus-method-to-server.

contrib/ChangeLog
contrib/nnir.el

index ffd1526..ed37d88 100644 (file)
@@ -1,3 +1,11 @@
+2006-06-08  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+       * nnir.el (nnir-retrieve-headers): Bind gnus-override-method before
+       calling gnus-retrieve-headers.  If we hit a group that isn't in
+       gnus-newsrc-hashtb, gnus-find-method-for-group invented a new select
+       method with empty parameters, possibly corrupting
+       gnus-server-method-cache on the next call to gnus-method-to-server.
+
 2006-06-01  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
        * nnir.el (nnir-retrieve-headers): Revert last change; we might as well
index f724669..77503f4 100644 (file)
@@ -816,24 +816,26 @@ and show thread that contains this article."
         ;; NOV data and prepend to `novdata'
         (set-buffer nntp-server-buffer)
        (nnir-possibly-change-server server)
-        (case (setq foo (gnus-retrieve-headers (list artno) artfullgroup nil))
-          (nov
-           (goto-char (point-min))
-           (setq novitem (nnheader-parse-nov))
-           (unless novitem
-             (pop-to-buffer nntp-server-buffer)
-             (error
-              "nnheader-parse-nov returned nil for article %s in group %s"
-              artno artfullgroup)))
-          (headers
-           (goto-char (point-min))
-           (setq novitem (nnheader-parse-head))
-           (unless novitem
-             (pop-to-buffer nntp-server-buffer)
-             (error
-              "nnheader-parse-head returned nil for article %s in group %s"
-              artno artfullgroup)))
-          (t (nnheader-report 'nnir "Don't support header type %s." foo)))
+        (let ((gnus-override-method
+              (gnus-server-to-method server)))
+         (case (setq foo (gnus-retrieve-headers (list artno) artfullgroup nil))
+           (nov
+            (goto-char (point-min))
+            (setq novitem (nnheader-parse-nov))
+            (unless novitem
+              (pop-to-buffer nntp-server-buffer)
+              (error
+               "nnheader-parse-nov returned nil for article %s in group %s"
+               artno artfullgroup)))
+           (headers
+            (goto-char (point-min))
+            (setq novitem (nnheader-parse-head))
+            (unless novitem
+              (pop-to-buffer nntp-server-buffer)
+              (error
+               "nnheader-parse-head returned nil for article %s in group %s"
+               artno artfullgroup)))
+           (t (nnheader-report 'nnir "Don't support header type %s." foo))))
        ;; replace article number in original group with article number
         ;; in nnir group
         (mail-header-set-number novitem art)