[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: sb-bbc.el patch



>> On Tue, 06 Jun 2006 08:58:31 +0900
>> yamaoka@xxxxxxx (Katsumi Yamaoka) said as follows:

>In the groups `business', `politics', and `talking_point', I got the
>"Cannot find message-id base" error as usual.  Well, it might be able
>to be solved by improving regexp, with which I'm bored though.  Isn't
>there a better way to cope with it?  What I'm always thinking is (and
>what I tried for some times but haven't been successful yet is)
>simply to ignore such unparseable entries rather than to issue an
>error.

I think that the attached change is acceptable to almost all
RSS-related backends and that it will simplify them.

-- 
TSUCHIYA Masatoshi
--- sb-rss.el	22 Dec 2005 05:48:04 -0000	1.33
+++ sb-rss.el	6 Jun 2006 01:52:47 -0000
@@ -135,6 +135,13 @@
 Basically, implement illeagal URL to generate error message.
 But clarify need ignored URL return nil.")
 
+(luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-rss)
+						  url date)
+  (when (string-match "[?#]" url)
+    (setq url (substring url 0 (match-beginning 0))))
+  (concat "<" (md5 url) "%" (shimbun-current-group shimbun)
+	  "@" (shimbun-server shimbun) ".shimbun.namazu.org>"))
+
 (luna-define-method shimbun-headers ((shimbun shimbun-rss) &optional range)
   (with-temp-buffer
     (let ((case-fold-search t))
--- sb-linux-ja.el	5 Jul 2005 23:52:29 -0000	1.6
+++ sb-linux-ja.el	6 Jun 2006 01:53:03 -0000
@@ -50,14 +50,6 @@
   (shimbun-expand-url (concat (shimbun-current-group-internal shimbun) ".rdf")
 		      shimbun-linux-ja-url))
 
-(luna-define-method shimbun-rss-build-message-id ((shimbun shimbun-linux-ja)
-						  url date)
-  (when (string-match "[?#]" url)
-    (setq url (substring url 0 (match-beginning 0))))
-  (unless (string-match "\\`http://japan.linux.com/\\(.*\\)\\.[^.]*\\'" url)
-    (error "Cannot find message-id base"))
-  (concat "<" (match-string 1 url) "@japan.linux.com>"))
-
 (luna-define-method shimbun-clear-contents :around ((shimbun shimbun-linux-ja)
 						    header)
   (when (luna-call-next-method)