[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 37f0f11 1/2: Remove the Gmane backend from nnir
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 37f0f11 1/2: Remove the Gmane backend from nnir |
Date: |
Wed, 11 Apr 2018 18:06:40 -0400 (EDT) |
branch: master
commit 37f0f114df4b4b9cb11cc7c607314f1f7a436766
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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).
---
etc/NEWS | 4 ++++
lisp/gnus/nnir.el | 54 ++----------------------------------------------------
2 files changed, 6 insertions(+), 52 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index ac60a36..059c6ee 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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'
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index 0a7d829..7d75603 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -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 " "))
- (authorspec
- (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)
- artlist)
- (require 'mm-url)
- (with-current-buffer (get-buffer-create nnir-tmp-buffer)
- (erase-buffer)
- (mm-url-insert
- (concat
- "http://search.gmane.org/nov.php"
- "?"
- (mm-url-encode-www-form-urlencoded
- `(("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)
- (push
- (vector
- (gnus-group-prefixed-name (match-string 1 xref) srv)
- (string-to-number (match-string 2 xref)) xscore)
- artlist)))))
- (forward-line 1)))
- (apply #'vector (nreverse (delete-dups artlist)))))
-
;;; Util Code:
(defun gnus-nnir-group-p (group)