/[emacs]/emacs/lisp/gnus/nnlistserv.el
ViewVC logotype

Diff of /emacs/lisp/gnus/nnlistserv.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.6.1 by handa, Fri Mar 12 00:03:11 2004 UTC revision 1.5.6.2 by miles, Thu Sep 9 09:36:26 2004 UTC
# Line 24  Line 24 
24    
25  ;;; Commentary:  ;;; Commentary:
26    
 ;; Note: You need to have `url' and `w3' installed for this  
 ;; backend to work.  
   
27  ;;; Code:  ;;; Code:
28    
29  (eval-when-compile (require 'cl))  (eval-when-compile (require 'cl))
30    
31  (require 'nnoo)  (require 'nnoo)
32  (eval-when-compile  (require 'mm-url)
33    (ignore-errors  (require 'nnweb)
    (require 'nnweb))                    ; requires W3  
   (autoload 'url-insert-file-contents "nnweb"))  
34    
35  (nnoo-declare nnlistserv  (nnoo-declare nnlistserv
36    nnweb)    nnweb)
# Line 98  Line 93 
93          (when (funcall (nnweb-definition 'search) page)          (when (funcall (nnweb-definition 'search) page)
94            ;; Go through all the article hits on this page.            ;; Go through all the article hits on this page.
95            (goto-char (point-min))            (goto-char (point-min))
96            (nnweb-decode-entities)            (mm-url-decode-entities)
97            (goto-char (point-min))            (goto-char (point-min))
98            (while (re-search-forward "^<li> *<a href=\"\\([^\"]+\\)\"><b>\\([^\\>]+\\)</b></a> *<[^>]+><i>\\([^>]+\\)<" nil t)            (while (re-search-forward "^<li> *<a href=\"\\([^\"]+\\)\"><b>\\([^\\>]+\\)</b></a> *<[^>]+><i>\\([^>]+\\)<" nil t)
99              (setq url (match-string 1)              (setq url (match-string 1)
# Line 124  Line 119 
119    (let ((case-fold-search t)    (let ((case-fold-search t)
120          (headers '(sent name email subject id))          (headers '(sent name email subject id))
121          sent name email subject id)          sent name email subject id)
122      (nnweb-decode-entities)      (mm-url-decode-entities)
123      (while headers      (while headers
124        (goto-char (point-min))        (goto-char (point-min))
125        (re-search-forward (format "<!-- %s=\"\\([^\"]+\\)" (car headers)) nil t)        (re-search-forward (format "<!-- %s=\"\\([^\"]+\\)" (car headers)) nil t)
# Line 135  Line 130 
130      (goto-char (point-max))      (goto-char (point-max))
131      (search-backward "<!-- body" nil t)      (search-backward "<!-- body" nil t)
132      (delete-region (point-max) (progn (beginning-of-line) (point)))      (delete-region (point-max) (progn (beginning-of-line) (point)))
133      (nnweb-remove-markup)      (mm-url-remove-markup)
134      (goto-char (point-min))      (goto-char (point-min))
135      (insert (format "From: %s <%s>\n" name email)      (insert (format "From: %s <%s>\n" name email)
136              (format "Subject: %s\n" subject)              (format "Subject: %s\n" subject)
# Line 143  Line 138 
138              (format "Date: %s\n\n" sent))))              (format "Date: %s\n\n" sent))))
139    
140  (defun nnlistserv-kk-search (search)  (defun nnlistserv-kk-search (search)
141    (url-insert-file-contents    (mm-url-insert
142     (concat (format (nnweb-definition 'address) search)     (concat (format (nnweb-definition 'address) search)
143             (nnweb-definition 'index)))             (nnweb-definition 'index)))
144    t)    t)

Legend:
Removed from v.1.5.6.1  
changed lines
  Added in v.1.5.6.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26