Subject: [PATCH] Limit warping to virtual groups

From: Dave Abrahams <[email-masked]>
Date: Wed, 06 Jun 2012 19:09:47 -0400

The addition of registry warping broke the promise of
gnus-warp-to-article that it should be a no-op in real groups.  The
enclosed patch fixes that bug.

>From 827747888a0f608c573532831fd358a80c837c0c Mon Sep 17 00:00:00 2001
From: Dave Abrahams <[email-masked]>
Date: Wed, 6 Jun 2012 19:07:15 -0400
Subject: [PATCH] Bugfix: honor gnus-warp-to-article's promise not to warp
 from real groups

Registry warping could occur in real groups, but it shouldn't.
---
 lisp/gnus-int.el |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el
index bc98693..18e56ed 100644
--- a/lisp/gnus-int.el
+++ b/lisp/gnus-int.el
@@ -587,14 +587,15 @@ This is the string that Gnus uses to identify the group."
   "Warps from an article in a virtual group to the article in its
 real group. Does nothing on a real group."
   (interactive)
-  (let ((gnus-command-method
-	 (gnus-find-method-for-group gnus-newsgroup-name)))
-    (or
-     (when (gnus-check-backend-function
-            'warp-to-article (car gnus-command-method))
-       (funcall (gnus-get-function gnus-command-method 'warp-to-article)))
-     (and (bound-and-true-p gnus-registry-enabled)
-	  (gnus-try-warping-via-registry)))))
+  (when (gnus-virtual-group-p gnus-newsgroup-name)
+    (let ((gnus-command-method
+           (gnus-find-method-for-group gnus-newsgroup-name)))
+      (or
+       (when (gnus-check-backend-function
+              'warp-to-article (car gnus-command-method))
+         (funcall (gnus-get-function gnus-command-method 'warp-to-article)))
+       (and (bound-and-true-p gnus-registry-enabled)
+            (gnus-try-warping-via-registry))))))
 
 (defun gnus-request-head (article group)
   "Request the head of ARTICLE in GROUP."
-- 
1.7.10.2

Ma Gnus v0.6
GNU Emacs 24.0.94.1 (x86_64-apple-darwin11.4.0, Carbon Version 1.6.0 AppKit 1138.47)
 of 2012-05-24 on pluto.luannocracy.com
200 news.gmane.org InterNetNews NNRP server INN 2.5.1 ready (posting ok)
101 Capability list:
VERSION 2
IMPLEMENTATION INN 2.5.1
AUTHINFO USER
HDR
LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT
OVER
POST
READER
STARTTLS
.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com