nnir.el (nnir-get-active): Improve active list retrieval.
authorAndrew Cohen <cohen@andy.bu.edu>
Mon, 29 Nov 2010 19:26:21 +0000 (14:26 -0500)
committerAndrew Cohen <cohen@andy.bu.edu>
Mon, 29 Nov 2010 19:26:21 +0000 (14:26 -0500)
lisp/ChangeLog
lisp/nnir.el

index b5d6c9a..ee44294 100644 (file)
@@ -2,6 +2,7 @@
 
        * nnir.el (nnir-request-move-article): Bail out if original group
        doesn't support article moves.
+       (nnir-get-active): Improve active list retrieval.
 
 2010-11-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
index b49c99e..8f936d5 100644 (file)
@@ -1508,15 +1508,35 @@ server is of form 'backend:name'."
        (goto-char (point-min))
        (unless (string= nnir-ignored-newsgroups "")
          (delete-matching-lines nnir-ignored-newsgroups))
-       (while (not (eobp))
-         (ignore-errors
-           (push (mm-string-as-unibyte
-                  (let ((p (point)))
-                    (skip-chars-forward "^ \t\\\\")
-                    (setq name (buffer-substring (+ p 1) (- (point) 1)))
-                    (gnus-group-full-name name method)))
-                 groups))
-         (forward-line))))
+       (if (eq (car method) 'nntp)
+           (while (not (eobp))
+             (ignore-errors
+               (push (mm-string-as-unibyte
+                      (gnus-group-full-name
+                       (buffer-substring
+                        (point)
+                        (progn
+                          (skip-chars-forward "^ \t")
+                          (point))) method))
+                     groups))
+             (forward-line))
+         (while (not (eobp))
+           (ignore-errors
+             (push (mm-string-as-unibyte
+                    (if (eq (char-after) ?\")
+                        (gnus-group-full-name (read cur) method)
+                      (let ((p (point)) (name ""))
+                        (skip-chars-forward "^ \t\\\\")
+                        (setq name (buffer-substring p (point)))
+                        (while (eq (char-after) ?\\)
+                          (setq p (1+ (point)))
+                          (forward-char 2)
+                          (skip-chars-forward "^ \t\\\\")
+                          (setq name (concat name (buffer-substring
+                                                   p (point)))))
+                        (gnus-group-full-name name method))))
+                   groups))
+           (forward-line)))))
     groups))
 
 ;; The end.