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

[mhc:00504] Re: About T-gnus support ( Re: Variable binding depth exceeds max-specpdl-size )



>> On Tue, 18 Apr 2000 09:58:09 +0900
>> 「三好」== miyoshi@xxxxxxxxxxxxxxxxx (MIYOSHI Masanori) said as follows:

三好> 一応修正版のパッチを添付します。

このパッチでも、時々おかしくなってしまうので、再実装してみました。
T-gnus 6.14.1 r16 (based on Gnus v5.8.3 ; for SEMI 1.13, FLIM 1.13) の
環境では、正常に動作しているように見えます。

--- mhc.el	2000/04/18 10:40:17	1.4
+++ mhc.el	2000/04/19 03:51:13
@@ -402,41 +402,41 @@
 	(setq mew-use-highlight-cursor-line nil))
        ((eq mhc-mailer-package 'gnus)
 	;; initialize gnus groups.
-	(let* ((dirlist (list (concat (mhc-gnus-ddate-to-folder ddate) "/")
-			      (concat (mhc-summary-folder-to-path
-				       mhc-base-folder) "/intersect/")))
-	       (vgroup mhc-base-folder) (pvgroup (concat "nnvirtual:" vgroup))
-	       dir pdir methods)
-	  ;; initialize nndir groups.
-	  (while dirlist
-	    (setq dir (car dirlist))
-	    (setq pdir (concat "nndir:" dir))
-	    (if (gnus-gethash pdir gnus-newsrc-hashtb)
-		(save-window-excursion
-		  (if (gnus-group-read-group 0 t pdir)
-		      (kill-buffer nil)))
-	      (if (not (file-exists-p dir))
-		  (mhc-file-make-directory dir))
-	      (let ((temp-buffer (get-buffer-create
-				  (generate-new-buffer-name " *temp*"))))
-		(unwind-protect
-		    (save-current-buffer
-		      (set-buffer temp-buffer)
-		      (gnus-group-make-directory-group dir))
-		  (kill-buffer temp-buffer))))
-	    (if methods (setq methods (concat methods "\\|")))
-	    (setq methods (concat methods "\\(^" pdir "$\\)"))
-	    (setq dirlist (cdr dirlist)))
+	(let* ((vgroup mhc-base-folder)
+	       (pvgroup (gnus-group-prefixed-name vgroup '(nnvirtual))))
 	  ;; initialize a nnvirtual group.
 	  (if (not (gnus-gethash pvgroup gnus-newsrc-hashtb))
 	      (gnus-group-make-empty-virtual vgroup))
 	  (gnus-close-group pvgroup)
-	  (setcar (cdr (gnus-info-method (gnus-get-info pvgroup))) methods)
-	  (save-window-excursion
-	    (if (gnus-group-read-group 0 t pvgroup)
-		(progn
-		  (gnus-summary-rescan-group)
-		  (kill-buffer nil))))
+	  (setcar (cdr (gnus-info-method (gnus-get-info pvgroup)))
+		  ;; generate regexp matches nndir groups.
+		  (mapconcat
+		   (lambda (s)
+		     (concat "\\(^" (regexp-quote s) "$\\)"))
+		   ;; initialize nndir groups.
+		   (delq nil
+			 (mapcar
+			  (lambda (dir)
+			    (setq dir (file-name-as-directory dir))
+			    (let* ((method `(nndir ,dir (nndir-directory ,dir)))
+				   (group (gnus-group-prefixed-name dir method)))
+			      (if (gnus-gethash group gnus-newsrc-hashtb)
+				  group
+				(mhc-file-make-directory dir)
+				(let ((temp-buffer (get-buffer-create
+						    (generate-new-buffer-name " *temp*"))))
+				  (unwind-protect
+				      (save-current-buffer
+					(set-buffer temp-buffer)
+					(gnus-group-make-group dir method)
+					(gnus-subscribe-group group))
+				    (kill-buffer temp-buffer)))
+				group)))
+			  (list (mhc-gnus-ddate-to-folder ddate)
+				(expand-file-name "intersect"
+						  (mhc-summary-folder-to-path mhc-base-folder)))))
+		   "\\|"))
+	  (gnus-activate-group pvgroup 'scan)
 	  (make-local-variable 'gnus-newsgroup-data)))))
     (message "Scanning %s ..." (ddate-yymm-s1 ddate "/"))
     (mhc-sch-scan (ddate-mm-first-day ddate)
-- 
土屋 雅稔  ( TSUCHIYA Masatoshi )
    http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/