emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102222: nnir: remove wais support


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102222: nnir: remove wais support
Date: Tue, 02 Nov 2010 11:28:45 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102222
author: Julien Danjou <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Tue 2010-11-02 11:28:45 +0000
message:
  nnir: remove wais support
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/nnir.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-11-02 04:08:43 +0000
+++ b/lisp/gnus/ChangeLog       2010-11-02 11:28:45 +0000
@@ -1,3 +1,7 @@
+2010-11-02  Julien Danjou  <address@hidden>
+
+       * nnir.el: Remove wais support.
+
 2010-11-02  Glenn Morris  <address@hidden>
 
        * gnus-html.el: Reorder requirements to quieten compiler.

=== modified file 'lisp/gnus/nnir.el'
--- a/lisp/gnus/nnir.el 2010-11-01 23:47:38 +0000
+++ b/lisp/gnus/nnir.el 2010-11-02 11:28:45 +0000
@@ -208,35 +208,6 @@
   :type '(string)
   :group 'nnir)
 
-(defcustom nnir-wais-program "waissearch"
-  "*Name of waissearch executable."
-  :type '(string)
-  :group 'nnir)
-
-(defcustom nnir-wais-database (expand-file-name "~/.wais/mail")
-  "*Name of Wais database containing the mail.
-
-Note that this should be a file name without extension.  For example,
-if you have a file /home/john/.wais/mail.fmt, use this:
-    (setq nnir-wais-database \"/home/john/.wais/mail\")
-The string given here is passed to `waissearch -d' as-is."
-  :type '(file)
-  :group 'nnir)
-
-(defcustom nnir-wais-remove-prefix (concat (getenv "HOME") "/Mail/")
-  "*The prefix to remove from each directory name returned by waissearch
-in order to get a group name (albeit with / instead of .).  This is a
-regular expression.
-
-For example, suppose that Wais returns file names such as
-\"/home/john/Mail/mail/misc/42\".  For this example, use the following
-setting:  (setq nnir-wais-remove-prefix \"/home/john/Mail/\")
-Note the trailing slash.  Removing this prefix gives \"mail/misc/42\".
-`nnir' knows to remove the \"/42\" and to replace \"/\" with \".\" to
-arrive at the correct group name, \"mail.misc\"."
-  :type '(regexp)
-  :group 'nnir)
-
 (defcustom nnir-swish++-configuration-file
   (expand-file-name "~/Mail/swish++.conf")
   "*Configuration file for swish++."
@@ -413,9 +384,7 @@
 ;;; Developer Extension Variable:
 
 (defvar nnir-engines
-  `((wais    nnir-run-waissearch
-             ())
-    (imap    nnir-run-imap
+  `((imap    nnir-run-imap
              ((criteria
               "Imap Search in"                   ; Prompt
               ,(mapcar 'car nnir-imap-search-arguments) ; alist for completing
@@ -713,51 +682,6 @@
 
 ;;; Search Engine Interfaces:
 
-;; freeWAIS-sf interface.
-(defun nnir-run-waissearch (query server &optional group)
-  "Run given query agains waissearch.  Returns vector of (group name, file 
name)
-pairs (also vectors, actually)."
-  ;; (when group
-  ;;   (error "The freeWAIS-sf backend cannot search specific groups"))
-  (save-excursion
-    (let ((qstring (cdr (assq 'query query)))
-         (prefix (nnir-read-server-parm 'nnir-wais-remove-prefix server))
-          artlist score artno dirnam)
-      (set-buffer (get-buffer-create nnir-tmp-buffer))
-      (erase-buffer)
-      (message "Doing WAIS query %s..." query)
-      (call-process nnir-wais-program
-                    nil                 ; input from /dev/null
-                    t                   ; output to current buffer
-                    nil                 ; don't redisplay
-                    "-d" (nnir-read-server-parm 'nnir-wais-database server) ; 
database to search
-                    qstring)
-      (message "Massaging waissearch output...")
-      ;; remove superfluous lines
-      (keep-lines "Score:")
-      ;; extract data from result lines
-      (goto-char (point-min))
-      (while (re-search-forward
-              "Score: +\\([0-9]+\\).*'\\([0-9]+\\) +\\([^']+\\)/'" nil t)
-        (setq score (match-string 1)
-              artno (match-string 2)
-              dirnam (match-string 3))
-        (unless (string-match prefix dirnam)
-          (nnheader-report 'nnir "Dir name %s doesn't contain prefix %s"
-                           dirnam prefix))
-        (setq group (gnus-replace-in-string
-                     (replace-match "" t t dirnam) "/" "."))
-        (push (vector (nnir-group-full-name group server)
-                      (string-to-number artno)
-                      (string-to-number score))
-              artlist))
-      (message "Massaging waissearch output...done")
-      (apply 'vector
-             (sort artlist
-                   (function (lambda (x y)
-                               (> (nnir-artitem-rsv x)
-                                  (nnir-artitem-rsv y)))))))))
-
 ;; imap interface
 (defun nnir-run-imap (query srv &optional groups)
   "Run a search against an IMAP back-end server.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]