[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for shimbun/sb-vinelinux.el
- From: SAITO Takuya <reed@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 May 2002 21:41:43 +0900 (JST)
- X-ml-name: emacs-w3m
- X-mail-count: 03376
shimbun/sb-vinelinux.el へのパッチです。
取り入れて頂ければ幸いです。
メインはVine Linux 2.5への対応ですが、変更点は
* shimbun/sb-vinelinux.el (shimbun-vinelinux-group-path-alist): Add
entry for Vine Linux 2.5 errata.
(shimbun-vinelinux-group-path-alist1): Remove.
(shimbun-get-headers): Don't retrieve index twice.
です。パッチが少し大きいのは、インデントが変わったせいです。
--
SAITO Takuya <reed@lily.freemail.ne.jp>
--- shimbun/sb-vinelinux.el.orig Tue May 14 19:53:56 2002
+++ shimbun/sb-vinelinux.el Tue May 14 19:46:38 2002
@@ -32,19 +32,16 @@
(defconst shimbun-vinelinux-url "http://www.vinelinux.org")
(defconst shimbun-vinelinux-group-path-alist
- '(("errata.2x.i386" . "errata/2x/i386.html")
+ '(("errata.25x.i386" . "errata/25x/i386.html")
+ ("errata.25x.ppc" . "errata/25x/ppc.html")
+ ("errata.25x.sparc" . "errata/25x/sparc.html")
+ ("errata.25x.alpha" . "errata/25x/alpha.html")
+ ("errata.2x.i386" . "errata/2x/i386.html")
("errata.2x.ppc" . "errata/2x/ppc.html")
("errata.2x.sparc" . "errata/2x/sparc.html")
("errata.2x.alpha" . "errata/2x/alpha.html")
("errata.1x" . "errata/1x/index.html")))
-(defconst shimbun-vinelinux-group-path-alist1
- '(("errata.2x.i386" . "errata/2x/")
- ("errata.2x.ppc" . "errata/2x/")
- ("errata.2x.sparc" . "errata/2x/")
- ("errata.2x.alpha" . "errata/2x/")
- ("errata.1x" . "errata/1x/")))
-
(defconst shimbun-vinelinux-groups
(mapcar 'car shimbun-vinelinux-group-path-alist))
(defconst shimbun-vinelinux-from-address "webmaster@www.vinelinux.com")
@@ -66,41 +63,36 @@
(let ((case-fold-search t)
(count 0)
start end headers aux url id date subject)
- (with-temp-buffer
- (shimbun-retrieve-url (shimbun-index-url shimbun) 'reload)
- (subst-char-in-region (point-min) (point-max) ?\t ? t)
- (setq start (progn
- (search-forward "</font>の更新/障害情報です</h4>" nil t nil)
- (search-forward "<table>" nil t nil)
- (point))
- end (progn (search-forward "</table>" nil t nil)
- (point)))
- (goto-char start)
- ;; Use entire archive.
- (catch 'stop
- (while (re-search-forward
- ;; <td><a href="20010501.html">quota の更新</a></td>
- ;; <td><a href="20010501-3.html">Vine Linux 2.1.5 にアップグレードした時の xdvi や tgif 等の日本語表示の不具合</a></td>
- "^<td><a href=\"\\(\\([0-9]+\\)\\(-[0-9]+\\)*\\.html\\)\">\\(.+\\)</a></td>"
- end t)
- (setq url (concat shimbun-vinelinux-url
- "/"
- (cdr (assoc (shimbun-current-group-internal shimbun)
- shimbun-vinelinux-group-path-alist1))
- (match-string-no-properties 1))
- id (format "<%s%05d%%%s>"
- (match-string-no-properties 1)
- (string-to-number (match-string-no-properties 2))
- (shimbun-current-group-internal shimbun))
- date (shimbun-vinelinux-parse-time (match-string-no-properties 2))
- subject (match-string 4))
- (if (shimbun-search-id shimbun id)
- (throw 'stop nil))
- (forward-line 1)
- (push (shimbun-make-header
- 0 (shimbun-mime-encode-string subject)
- shimbun-vinelinux-from-address date id "" 0 0 url)
- headers))))
+ (subst-char-in-region (point-min) (point-max) ?\t ? t)
+ (setq start (progn
+ (search-forward "</font>の更新/障害情報です</h4>" nil t nil)
+ (search-forward "<table>" nil t nil)
+ (point))
+ end (progn (search-forward "</table>" nil t nil)
+ (point)))
+ (goto-char start)
+ ;; Use entire archive.
+ (catch 'stop
+ (while (re-search-forward
+ ;; <td><a href="20010501.html">quota の更新</a></td>
+ ;; <td><a href="20010501-3.html">Vine Linux 2.1.5 にアップグレードした時の xdvi や tgif 等の日本語表示の不具合</a></td>
+ "^<td><a href=\"\\(\\([0-9]+\\)\\(-[0-9]+\\)*\\.html\\)\">\\(.+\\)</a></td>"
+ end t)
+ (setq url (shimbun-expand-url (match-string-no-properties 1)
+ (shimbun-index-url shimbun))
+ id (format "<%s%05d%%%s>"
+ (match-string-no-properties 1)
+ (string-to-number (match-string-no-properties 2))
+ (shimbun-current-group-internal shimbun))
+ date (shimbun-vinelinux-parse-time (match-string-no-properties 2))
+ subject (match-string 4))
+ (if (shimbun-search-id shimbun id)
+ (throw 'stop nil))
+ (forward-line 1)
+ (push (shimbun-make-header
+ 0 (shimbun-mime-encode-string subject)
+ shimbun-vinelinux-from-address date id "" 0 0 url)
+ headers)))
headers))
(luna-define-method shimbun-make-contents ((shimbun shimbun-vinelinux) header)