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

Re: ordering articles of shimbun/hnf



阿部です。

At Thu, 19 Apr 2001 11:35:13 +0900 (JST),
Shun-ichi GOTO wrote:
> title.cgi で取得すると、日付の最近のものから順に、1日のarticle は#1から
> 順に、というふうに得られますが、多くの場合、#1 よりは #2 の方が後に書か
> れたものであると思うので、この番号でsort 出来るようにしてみました。

なるほど、こうするとよかったんですね。

元の状態が読みにくかったんで、何を思ったか日付毎にスレッドにする、とい
う不思議なことをしてしまいました。一応patchつけます。

けどこれ、あんまり見やすくないですね^^;
話題毎に並ぶわけじゃないですし。うーん

----
ABe Yasushi
Index: sb-hns.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/shimbun/sb-hns.el,v
retrieving revision 1.3
diff -u -r1.3 sb-hns.el
--- sb-hns.el	2001/04/19 03:24:58	1.3
+++ sb-hns.el	2001/04/19 04:25:45
@@ -57,7 +57,7 @@
 
 (luna-define-method shimbun-get-headers ((shimbun shimbun-hns))
   (let ((case-fold-search t)
-	id year month mday sect uniq pos subject
+	id references year month mday sect uniq pos subject
 	headers)
     (goto-char (point-min))
     (while (re-search-forward "<a href=\"[^\\?]*\\?\\([^\\#]*#\\([0-9][0-9][0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9]+\\)\\)\">[^<]+</a>:" nil t)
@@ -81,6 +81,14 @@
 		       (eword-encode-string
 			(shimbun-current-group-internal
 			 shimbun))))
+      (if (> sect 1)
+	(setq references 
+	      (format "<%s1%%%s.hns>"
+		      (substring uniq 0 (- (length uniq) (length (string sect))))
+		      (eword-encode-string
+		       (shimbun-current-group-internal
+			shimbun))))
+	(setq references ""))
       (push (shimbun-make-header
 	     0
 	     (shimbun-mime-encode-string (or subject ""))
@@ -88,7 +96,7 @@
 			   shimbun-hns-group-alist))
 	     (shimbun-make-date-string year month mday
 				       (format "00:%02d" sect))
-	     id "" 0 0 uniq)
+	     id references 0 0 uniq)
 	    headers))
     headers))
 ;    ;; sort by xref