Commit 99e58ed5 authored by Andrew Cohen's avatar Andrew Cohen Committed by Katsumi Yamaoka
Browse files

nnir.el (nnir-run-gmane): Better check for gmane groups: error out if...

nnir.el (nnir-run-gmane): Better check for gmane groups: error out if groupname doesn't contain "gmane".
parent 7410c270
2010-12-13 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-run-gmane): Better check for gmane groups: error out if
groupname doesn't contain "gmane".
2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
 
* gnus-start.el (gnus-matches-options-n): Fix typo in last change.
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment