Commit 37f0f114 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Remove the Gmane backend from nnir

* lisp/gnus/nnir.el (nnir-engines): Remove Gmane backend, which no
longer exists.
(nnir-method-default-engines): Ditto.
(nnir-run-gmane): Removed function (bug#28234).
parent b2a7a96f
......@@ -186,6 +186,10 @@ Of course it will still find it if you have it in ~/.ecompleterc
*** The function 'gnus-score-find-favorite-words' has been renamed
from 'gnus-score-find-favourite-words'.
*** Gmane has been removed as an nnir backend, since Gmane no longer
has a search engine.
** Htmlfontify
*** The functions 'hfy-color', 'hfy-color-vals' and
'hfy-fallback-color-values' and the variables 'hfy-fallback-color-map'
......@@ -30,7 +30,7 @@
;;; Commentary:
;; What does it do? Well, it allows you to search your mail using
;; some search engine (imap, namazu, swish-e, gmane and others -- see
;; some search engine (imap, namazu, swish-e and others -- see
;; later) by typing `G G' in the Group buffer. You will then get a
;; buffer which shows all articles matching the query, sorted by
;; Retrieval Status Value (score).
......@@ -530,8 +530,6 @@ that it is for notmuch, not Namazu."
nnir-imap-search-argument-history ; the history to use
,nnir-imap-default-search-key ; default
(gmane nnir-run-gmane
((gmane-author . "Gmane Author: ")))
(swish++ nnir-run-swish++
((swish++-group . "Swish++ Group spec (regexp): ")))
(swish-e nnir-run-swish-e
......@@ -561,7 +559,7 @@ needs the variables `nnir-namazu-program',
Add an entry here when adding a new search engine.")
(defcustom nnir-method-default-engines '((nnimap . imap) (nntp . gmane))
(defcustom nnir-method-default-engines '((nnimap . imap))
"Alist of default search engines keyed by server method."
:version "24.1"
:group 'nnir
......@@ -1667,54 +1665,6 @@ actually)."
(declare-function mm-url-insert "mm-url" (url &optional follow-refresh))
(declare-function mm-url-encode-www-form-urlencoded "mm-url" (pairs))
;; gmane interface
(defun nnir-run-gmane (query srv &optional groups)
"Run a search against a gmane back-end server."
(let* ((case-fold-search t)
(qstring (cdr (assq 'query query)))
;; (server (cadr (gnus-server-to-method srv)))
(groupspec (mapconcat
(lambda (x)
(if (string-match-p "gmane" x)
(format "group:%s" (gnus-group-short-name x))
(error "Can't search non-gmane groups: %s" x)))
groups " "))
(if (assq 'gmane-author query)
(format "author:%s" (cdr (assq 'gmane-author query))) ""))
(search (format "%s %s %s"
qstring groupspec authorspec))
(gnus-inhibit-demon t)
(require 'mm-url)
(with-current-buffer (get-buffer-create nnir-tmp-buffer)
`(("query" . ,search)
("HITSPERPAGE" . "999")))))
(set-buffer-multibyte t)
(decode-coding-region (point-min) (point-max) 'utf-8)
(goto-char (point-min))
(forward-line 1)
(while (not (eobp))
(unless (or (eolp) (looking-at "\x0d"))
(let ((header (nnheader-parse-nov)))
(let ((xref (mail-header-xref header))
(xscore (string-to-number (cdr (assoc 'X-Score
(mail-header-extra header))))))
(when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref)
(gnus-group-prefixed-name (match-string 1 xref) srv)
(string-to-number (match-string 2 xref)) xscore)
(forward-line 1)))
(apply #'vector (nreverse (delete-dups artlist)))))
;;; Util Code:
(defun gnus-nnir-group-p (group)
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