1 ;;; sb-xemacs.el --- shimbun backend for xemacs.org
3 ;; Author: TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>
4 ;; Akihiro Arisawa <ari@atesoft.advantest.co.jp>
5 ;; Yuuichi Teranishi <teranisi@gohome.org>
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program; if not, you can either send email to this
23 ;; program's maintainer or write to: The Free Software Foundation,
24 ;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
28 ;; Original code was nnshimbun.el written by
29 ;; TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>.
36 (luna-define-class shimbun-xemacs (shimbun-mhonarc) ())
38 (defvar shimbun-xemacs-url "http://list-archives.xemacs.org/")
39 (defvar shimbun-xemacs-groups '("xemacs-announce"
40 "xemacs-beta-ja" "xemacs-beta"
41 "xemacs-build-reports" "xemacs-cvs"
42 "xemacs-mule" "xemacs-nt" "xemacs-patches"
43 "xemacs-users-ja" "xemacs"))
44 (defvar shimbun-xemacs-coding-system (static-if (boundp 'MULE)
45 '*euc-japan* 'euc-jp))
47 (defmacro shimbun-xemacs-concat-url (shimbun url)
48 (` (concat (shimbun-url-internal shimbun)
49 (shimbun-current-group-internal shimbun) "/" (, url))))
51 (luna-define-method shimbun-index-url ((shimbun shimbun-xemacs))
52 (shimbun-xemacs-concat-url shimbun nil))
54 (luna-define-method shimbun-get-headers ((shimbun shimbun-xemacs))
55 (let ((case-fold-search t)
59 (if (re-search-forward
60 (concat "<A HREF=\"/" (shimbun-current-group-internal shimbun)
61 "/\\([12][0-9][0-9][0-9][0-1][0-9]\\)/\">\\[Index\\]")
63 (setq auxs (append auxs (list (match-string 1)))))
68 (shimbun-xemacs-concat-url shimbun
69 (concat (setq aux (car auxs)) "/")))
70 (let ((case-fold-search t)
72 (goto-char (point-max))
73 (while (re-search-backward
74 "<A[^>]*HREF=\"\\(msg\\([0-9]+\\).html\\)\">\\([^<]+\\)<"
76 (setq url (shimbun-xemacs-concat-url
78 (concat aux "/" (match-string 1)))
79 id (format "<%s%05d%%%s>"
81 (string-to-number (match-string 2))
82 (shimbun-current-group-internal shimbun))
83 subject (match-string 3))
85 (push (shimbun-make-header
87 (shimbun-mime-encode-string subject)
88 (if (looking-at "<td><em>\\([^<]+\\)<")
95 (setq auxs (cdr auxs))))
100 ;;; sb-xemacs.el ends here