comparison lisp/gnus/nnlistserv.el @ 31716:9968f55ad26e

Update to emacs-21-branch of the Gnus CVS repository.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 19 Sep 2000 13:37:09 +0000
parents 006eeb212983
children c8c683f24c57
comparison
equal deleted inserted replaced
31715:7c896543d225 31716:9968f55ad26e
1 ;;; nnlistserv.el --- retrieving articles via web mailing list archives 1 ;;; nnlistserv.el --- retrieving articles via web mailing list archives
2 ;; Copyright (C) 1997,98 Free Software Foundation, Inc. 2
3 ;; Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3 4
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
5 ;; Keywords: news, mail 6 ;; Keywords: news, mail
6 7
7 ;; This file is part of GNU Emacs. 8 ;; This file is part of GNU Emacs.
29 ;;; Code: 30 ;;; Code:
30 31
31 (eval-when-compile (require 'cl)) 32 (eval-when-compile (require 'cl))
32 33
33 (require 'nnoo) 34 (require 'nnoo)
34 (eval-when-compile (ignore-errors (require 'nnweb))) 35 (require 'nnweb)
35 (eval '(require 'nnweb))
36 36
37 (nnoo-declare nnlistserv 37 (nnoo-declare nnlistserv
38 nnweb) 38 nnweb)
39 39
40 (defvoo nnlistserv-directory (nnheader-concat gnus-directory "nnlistserv/") 40 (defvoo nnlistserv-directory (nnheader-concat gnus-directory "nnlistserv/")
44 (defvoo nnlistserv-name 'kk 44 (defvoo nnlistserv-name 'kk
45 "What search engine type is being used." 45 "What search engine type is being used."
46 nnweb-type) 46 nnweb-type)
47 47
48 (defvoo nnlistserv-type-definition 48 (defvoo nnlistserv-type-definition
49 '((kk 49 '((kk
50 (article . nnlistserv-kk-wash-article) 50 (article . nnlistserv-kk-wash-article)
51 (map . nnlistserv-kk-create-mapping) 51 (map . nnlistserv-kk-create-mapping)
52 (search . nnlistserv-kk-search) 52 (search . nnlistserv-kk-search)
53 (address . "http://www.itk.ntnu.no/ansatte/Andresen_Trond/kk-f/%s/") 53 (address . "http://www.itk.ntnu.no/ansatte/Andresen_Trond/kk-f/%s/")
54 (pages "fra160396" "fra160796" "fra061196" "fra160197" 54 (pages "fra160396" "fra160796" "fra061196" "fra160197"
55 "fra090997" "fra040797" "fra130397" "nye") 55 "fra090997" "fra040797" "fra130397" "nye")
56 (index . "date.html") 56 (index . "date.html")
57 (identifier . nnlistserv-kk-identity))) 57 (identifier . nnlistserv-kk-identity)))
58 "Type-definition alist." 58 "Type-definition alist."
59 nnweb-type-definition) 59 nnweb-type-definition)
60 60
61 (defvoo nnlistserv-search nil 61 (defvoo nnlistserv-search nil
62 "Search string to feed to DejaNews." 62 "Search string to feed to DejaNews."
110 (cdr active) subject from "" 110 (cdr active) subject from ""
111 (concat "<" (nnweb-identifier url) "@kk>") 111 (concat "<" (nnweb-identifier url) "@kk>")
112 nil 0 0 url)) 112 nil 0 0 url))
113 map) 113 map)
114 (nnweb-set-hashtb (cadar map) (car map)) 114 (nnweb-set-hashtb (cadar map) (car map))
115 (nnheader-message 5 "%s %s %s" (cdr active) (point) pages) 115 (nnheader-message 5 "%s %s %s" (cdr active) (point) pages)))))
116 ))))
117 ;; Return the articles in the right order. 116 ;; Return the articles in the right order.
118 (setq nnweb-articles 117 (setq nnweb-articles
119 (sort (nconc nnweb-articles map) 'car-less-than-car))))) 118 (sort (nconc nnweb-articles map) 'car-less-than-car)))))
120 119
121 (defun nnlistserv-kk-wash-article () 120 (defun nnlistserv-kk-wash-article ()
140 (format "Message-ID: %s\n" id) 139 (format "Message-ID: %s\n" id)
141 (format "Date: %s\n\n" sent)))) 140 (format "Date: %s\n\n" sent))))
142 141
143 (defun nnlistserv-kk-search (search) 142 (defun nnlistserv-kk-search (search)
144 (url-insert-file-contents 143 (url-insert-file-contents
145 (concat (format (nnweb-definition 'address) search) 144 (concat (format (nnweb-definition 'address) search)
146 (nnweb-definition 'index))) 145 (nnweb-definition 'index)))
147 t) 146 t)
148 147
149 (defun nnlistserv-kk-identity (url) 148 (defun nnlistserv-kk-identity (url)
150 "Return an unique identifier based on URL." 149 "Return an unique identifier based on URL."