annotate lisp/gnus/nnlistserv.el @ 57856:df80d19d7a2e

Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-65 Update from CVS 2004-11-01 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-msg.el (gnus-summary-resend-default-address): Add :version. * lisp/gnus/tls.el (tls-process-connection-type, tls-success) (tls-certtool-program): Add :version. * lisp/gnus/starttls.el (starttls-gnutls-program, starttls-use-gnutls) (starttls-extra-arguments, starttls-process-connection-type) (starttls-connect, starttls-failure, starttls-success): * lisp/gnus/spam-stat.el (spam-stat): Add :version. * lisp/gnus/sieve.el (sieve): Add :version. * lisp/gnus/sha1.el (sha1): Added :version. (sha1-use-external): Removed redundant version. * lisp/gnus/nnmail.el (nnmail-split-fancy-with-parent-ignore-groups) (nnmail-cache-ignore-groups, nnmail-spool-hook) (nnmail-split-fancy-match-partial-words) (nnmail-split-lowercase-expanded): * lisp/gnus/nndiary.el (nndiary): Add :version. * lisp/gnus/mml2015.el (mml2015-unabbrev-trust-alist): Add :version. * lisp/gnus/mml-sec.el (mml-default-sign-method) (mml-default-encrypt-method, mml-signencrypt-style-alist): Add :version. * lisp/gnus/mm-uu.el (mm-uu-diff-groups-regexp): Add :version. * lisp/gnus/mm-url.el (mm-url-use-external, mm-url-program) (mm-url-arguments): Add :version. * lisp/gnus/mm-decode.el (mm-inline-text-html-with-w3m-keymap) (mm-attachment-file-modes, mm-decrypt-option) (mm-w3m-safe-url-regexp): Add :version. * lisp/gnus/message.el (message-cite-prefix-regexp) (message-sendmail-envelope-from, message-minibuffer-local-map) (message-user-fqdn, message-completion-alist): Add :version. * lisp/gnus/gnus-win.el (gnus-configure-windows-hook) (gnus-use-frames-on-any-display): Add :version. * lisp/gnus/gnus-art.el (gnus-article-address-banner-alist) (gnus-treat-unsplit-urls, gnus-treat-unfold-headers) (gnus-treat-from-picon, gnus-treat-mail-picon) (gnus-treat-x-pgp-sig): Add :version. * lisp/gnus/gnus-sum.el (gnus-spam-mark, gnus-recent-mark) (gnus-undownloaded-mark, gnus-summary-article-move-hook) (gnus-summary-article-delete-hook) (gnus-summary-display-while-building): Add :version. * lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks) (gnus-get-top-new-news-hook):Add :version. * lisp/gnus/gnus-srvr.el (gnus-server-agent-face, gnus-server-opened-face) (gnus-server-closed-face, gnus-server-denied-face): Add :version. * lisp/gnus/gnus-registry.el (gnus-registry): Add :version. * lisp/gnus/gnus-spec.el (gnus-use-correct-string-widths) (gnus-make-format-preserve-properties): Add :version. * lisp/gnus/gnus.el (gnus-group-charter-alist) (gnus-group-fetch-control-use-browse-url) (gnus-install-group-spam-parameters): Add :version. * lisp/gnus/gnus-diary.el (gnus-diary): Add :version. * lisp/gnus/gnus-delay.el (gnus-delay): Add :version. * lisp/gnus/gnus-cite.el (gnus-cite-unsightly-citation-regexp) (gnus-cite-ignore-quoted-from, gnus-cite-attribution-face) (gnus-cite-blank-line-after-header, gnus-article-boring-faces): Add :version. * lisp/gnus/gnus-agent.el (gnus-agent-max-fetch-size) (gnus-agent-enable-expiration, gnus-agent-queue-mail) (gnus-agent-prompt-send-queue): Add :version. * lisp/gnus/deuglify.el (gnus-outlook-deuglify): Add :version. * lisp/gnus/html2text.el: Beautify code. Improve doc strings. Some checkdoc cleanup. (html2text-get-attr, html2text-fix-paragraph): Simplify code. (html2text-format-tag-list): Added "strong" and "em". From "Alfred M. Szmidt" <ams@kemisten.nu> (tiny change).
author Miles Bader <miles@gnu.org>
date Mon, 01 Nov 2004 23:06:36 +0000
parents 55fd4f77387a
children 18a818a2ee7c cce1c0ee76ee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
1 ;;; nnlistserv.el --- retrieving articles via web mailing list archives
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
2
53875
cb0bc8ce8e5a (nnlistserv-kk-wash-article): Fix paren nesting.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
3 ;; Copyright (C) 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
4
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
6 ;; Keywords: news, mail
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
7
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
9
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
13 ;; any later version.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
14
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
19
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
24
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
25 ;;; Commentary:
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
26
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
27 ;;; Code:
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
28
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
29 (eval-when-compile (require 'cl))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
30
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
31 (require 'nnoo)
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 53875
diff changeset
32 (require 'mm-url)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 53875
diff changeset
33 (require 'nnweb)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
34
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
35 (nnoo-declare nnlistserv
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
36 nnweb)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
37
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
38 (defvoo nnlistserv-directory (nnheader-concat gnus-directory "nnlistserv/")
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
39 "Where nnlistserv will save its files."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
40 nnweb-directory)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
41
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
42 (defvoo nnlistserv-name 'kk
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
43 "What search engine type is being used."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
44 nnweb-type)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
45
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
46 (defvoo nnlistserv-type-definition
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
47 '((kk
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
48 (article . nnlistserv-kk-wash-article)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
49 (map . nnlistserv-kk-create-mapping)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
50 (search . nnlistserv-kk-search)
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
51 (address . "http://www.itk.ntnu.no/ansatte/Andresen_Trond/kk-f/%s/")
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
52 (pages "fra160396" "fra160796" "fra061196" "fra160197"
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
53 "fra090997" "fra040797" "fra130397" "nye")
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
54 (index . "date.html")
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
55 (identifier . nnlistserv-kk-identity)))
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
56 "Type-definition alist."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
57 nnweb-type-definition)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
58
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
59 (defvoo nnlistserv-search nil
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
60 "Search string to feed to DejaNews."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
61 nnweb-search)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
62
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
63 (defvoo nnlistserv-ephemeral-p nil
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
64 "Whether this nnlistserv server is ephemeral."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
65 nnweb-ephemeral-p)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
66
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
67 ;;; Internal variables
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
68
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
69 ;;; Interface functions
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
70
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
71 (nnoo-define-basics nnlistserv)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
72
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
73 (nnoo-import nnlistserv
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
74 (nnweb))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
75
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
76 ;;; Internal functions
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
77
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
78 ;;;
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
79 ;;; KK functions.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
80 ;;;
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
81
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
82 (defun nnlistserv-kk-create-mapping ()
47935
70d7c96ed22f (nnlistserv-kk-create-mapping): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 33924
diff changeset
83 "Perform the search and create a number-to-url alist."
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
84 (save-excursion
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
85 (set-buffer nnweb-buffer)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
86 (let ((case-fold-search t)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
87 (active (or (cadr (assoc nnweb-group nnweb-group-alist))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
88 (cons 1 0)))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
89 (pages (nnweb-definition 'pages))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
90 map url page subject from )
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
91 (while (setq page (pop pages))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
92 (erase-buffer)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
93 (when (funcall (nnweb-definition 'search) page)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
94 ;; Go through all the article hits on this page.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
95 (goto-char (point-min))
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 53875
diff changeset
96 (mm-url-decode-entities)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
97 (goto-char (point-min))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
98 (while (re-search-forward "^<li> *<a href=\"\\([^\"]+\\)\"><b>\\([^\\>]+\\)</b></a> *<[^>]+><i>\\([^>]+\\)<" nil t)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
99 (setq url (match-string 1)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
100 subject (match-string 2)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
101 from (match-string 3))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
102 (setq url (concat (format (nnweb-definition 'address) page) url))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
103 (unless (nnweb-get-hashtb url)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
104 (push
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
105 (list
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
106 (incf (cdr active))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
107 (make-full-mail-header
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
108 (cdr active) subject from ""
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
109 (concat "<" (nnweb-identifier url) "@kk>")
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
110 nil 0 0 url))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
111 map)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
112 (nnweb-set-hashtb (cadar map) (car map))
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
113 (nnheader-message 5 "%s %s %s" (cdr active) (point) pages)))))
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
114 ;; Return the articles in the right order.
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
115 (setq nnweb-articles
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
116 (sort (nconc nnweb-articles map) 'car-less-than-car)))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
117
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
118 (defun nnlistserv-kk-wash-article ()
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
119 (let ((case-fold-search t)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
120 (headers '(sent name email subject id))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
121 sent name email subject id)
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 53875
diff changeset
122 (mm-url-decode-entities)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
123 (while headers
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
124 (goto-char (point-min))
53875
cb0bc8ce8e5a (nnlistserv-kk-wash-article): Fix paren nesting.
Andreas Schwab <schwab@suse.de>
parents: 52401
diff changeset
125 (re-search-forward (format "<!-- %s=\"\\([^\"]+\\)" (car headers)) nil t)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
126 (set (pop headers) (match-string 1)))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
127 (goto-char (point-min))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
128 (search-forward "<!-- body" nil t)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
129 (delete-region (point-min) (progn (forward-line 1) (point)))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
130 (goto-char (point-max))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
131 (search-backward "<!-- body" nil t)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
132 (delete-region (point-max) (progn (beginning-of-line) (point)))
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 53875
diff changeset
133 (mm-url-remove-markup)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
134 (goto-char (point-min))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
135 (insert (format "From: %s <%s>\n" name email)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
136 (format "Subject: %s\n" subject)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
137 (format "Message-ID: %s\n" id)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
138 (format "Date: %s\n\n" sent))))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
139
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
140 (defun nnlistserv-kk-search (search)
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 53875
diff changeset
141 (mm-url-insert
31716
9968f55ad26e Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents: 24577
diff changeset
142 (concat (format (nnweb-definition 'address) search)
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
143 (nnweb-definition 'index)))
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
144 t)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
145
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
146 (defun nnlistserv-kk-identity (url)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
147 "Return an unique identifier based on URL."
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
148 url)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
149
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
150 (provide 'nnlistserv)
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
151
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47935
diff changeset
152 ;;; arch-tag: 7705176f-d332-4a5e-a520-d0d319445617
24358
a7e0a6973e7c Initial revision
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
diff changeset
153 ;;; nnlistserv.el ends here