gnus-group-insert-group-line: Compute icon to return
[gnus] / lisp / nnir.el
index c14d9a1..954b489 100644 (file)
 
 ;; I have tried to make the code expandable.  Basically, it is divided
 ;; into two layers.  The upper layer is somewhat like the `nnvirtual'
-;; or `nnkiboze' backends: given a specification of what articles to
-;; show from another backend, it creates a group containing exactly
-;; those articles.  The lower layer issues a query to a search engine
-;; and produces such a specification of what articles to show from the
+;; backend: given a specification of what articles to show from
+;; another backend, it creates a group containing exactly those
+;; articles.  The lower layer issues a query to a search engine and
+;; produces such a specification of what articles to show from the
 ;; other backend.
 
 ;; The interface between the two layers consists of the single
@@ -733,7 +733,7 @@ and show thread that contains this article."
   ;; Just set the server variables appropriately.
   (nnoo-change-server 'nnir server definitions))
 
-(deffoo nnir-request-group (group &optional server fast)
+(deffoo nnir-request-group (group &optional server fast info)
   "GROUP is the query string."
   (nnir-possibly-change-server server)
   ;; Check for cache and return that if appropriate.
@@ -744,8 +744,7 @@ and show thread that contains this article."
       nnir-artlist
     ;; Cache miss.
     (setq nnir-artlist (nnir-run-query group)))
-  (save-excursion
-    (set-buffer nntp-server-buffer)
+  (with-current-buffer nntp-server-buffer
     (if (zerop (length nnir-artlist))
        (progn
          (setq nnir-current-query nil
@@ -792,7 +791,7 @@ and show thread that contains this article."
              (setq novitem (funcall nnir-get-article-nov-override-function
                                     artitem))
          ;; else, set novitem through nnheader-parse-nov/nnheader-parse-head
-           (case (setq foo (gnus-retrieve-headers (list artno) 
+           (case (setq foo (gnus-retrieve-headers (list artno)
                                                   artfullgroup nil))
              (nov
               (goto-char (point-min))
@@ -1537,17 +1536,13 @@ Tested with Namazu 2.0.6 on a GNU/Linux system."
           "find" group "-type" "f" "-name" "[0-9]*" "-exec"
           "grep"
           `("-l" ,@(and grep-options
-                        ;; Note: the 3rd arg of `split-string' is not
-                        ;; available in Emacs 21.
-                        (delete "" (split-string grep-options "\\s-")))
+                        (split-string grep-options "\\s-" t))
             "-e" ,regexp "{}" "+"))))
 
       ;; Translate relative paths to group names.
       (while (not (eobp))
-       (let* ((path (delete
-                     ""
-                     (split-string
-                      (buffer-substring (point) (line-end-position)) "/")))
+       (let* ((path (split-string
+                     (buffer-substring (point) (line-end-position)) "/" t))
               (art (string-to-number (car (last path)))))
          (while (string= "." (car path))
            (setq path (cdr path)))
@@ -1697,5 +1692,4 @@ The Gnus backend/server information is added."
 ;; The end.
 (provide 'nnir)
 
-;; arch-tag: 9b3fecf8-4397-4bbb-bf3c-6ac3cbbc6664
 ;;; nnir.el ends here