From 9ebaf43d5423c1a6a291c06b2c16fb22a0bf32e6 Mon Sep 17 00:00:00 2001 From: Andrew Cohen Date: Mon, 13 Dec 2010 18:26:26 -0500 Subject: [PATCH] nnir.el (nnir-run-gmane): Better check for gmane groups. --- lisp/ChangeLog | 5 +++++ lisp/nnir.el | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7293861fb..05d6e38ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-13 Andrew Cohen + + * nnir.el (nnir-run-gmane): Better check for gmane groups: error out if + groupname doesn't contain "gmane". + 2010-12-13 Lars Magne Ingebrigtsen * netrc.el (netrc-point-at-eol): Remove the unused netrc-point-at-old diff --git a/lisp/nnir.el b/lisp/nnir.el index d3ec3d24b..6c97f7279 100644 --- a/lisp/nnir.el +++ b/lisp/nnir.el @@ -1397,14 +1397,15 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." ;; gmane interface (defun nnir-run-gmane (query srv &optional groups) "Run a search against a gmane back-end server." - (if (gnus-string-match-p "gmane" srv) (let* ((case-fold-search t) (qstring (cdr (assq 'query query))) (server (cadr (gnus-server-to-method srv))) (groupspec (mapconcat (lambda (x) - (format "group:%s" (gnus-group-short-name x))) - groups " ")) + (if (gnus-string-match-p "gmane" x) + (format "group:%s" (gnus-group-short-name x)) + (error "Can't search non-gmane groups: %s" x))) + groups " ")) (authorspec (if (assq 'author query) (format "author:%s" (cdr (assq 'author query))) "")) @@ -1439,9 +1440,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (string-to-number (match-string 2 xref)) xscore) artlist))))) (forward-line 1))) - (apply 'vector (nreverse (mm-delete-duplicates artlist)))) - (message "Can't search non-gmane nntp groups") - nil)) + (apply 'vector (nreverse (mm-delete-duplicates artlist))))) ;;; Util Code: -- 2.25.1