[mew-win32 04223] Re: mew4.2での "k/" namzu での検索エラー

Hideyuki SHIRAI ( 白井秀行 ) shirai at example.com
2005年 5月 8日 (日) 21:34:15 JST


From: tornado at example.com <tornado at example.com> さん曰く
Subject: [mew-win32 04222] mew4.2での"k/"= ?ISO-2022-JP?B?GyRCJEckThsoQg==?=namzu での検索エラー
Message-ID: <55611.210.138.18.60.1115525513.squirrel at example.com>
Date: Sun, 8 May 2005 13:11:53 +0900 (JST)

> Mew4.2にしてから、namazuでの検索に失敗するようになりました。

>   string-match("^[$%+-]" nil)
>   mew-nmz-multi-pick(("d:/HOME/Namazu/Mail/inbox") "+from:***" nil)

mew-dist で指摘されたものと同じかしら?
http://www.mew.org/ml/mew-dist-4.1/msg00665.html
http://www.mew.org/ml/mew-dist-4.1/msg00666.html

これでしたら、Mew 4.2 の CVS Head (Mew 4.2.50)では直っています。
違うようでしたら、*.elc を消して、もう一度 backtrace をとってい
ただけるとありがたいです。

なお、"G" してパッチを出したため、mew.org のアーカイブ(*1)は扱い
にくいので、Mew 4.2 の mew-nmz.el にあてるパッチを再掲しておきま
す。

(*1) http://www.mew.org/ml/mew-dist-4.1/msg00703.html

-- 
白井秀行 (mailto:shirai at example.com)
-------------- next part --------------
--- mew-nmz.el.orig	2005-03-14 16:34:10.000000000 +0900
+++ mew-nmz.el	2005-04-10 10:54:29.246893642 +0900
@@ -402,7 +402,7 @@
 	(mew-nmz-timestamp-rename fld)
 	(setq msg (format "Mew mknmz (%s)...done" fld))
 	(when mew-nmz-setup-p
-	  (setq fld (mew-nmz-case-folder-normalize (directory-file-name fld)))
+	  (setq fld (mew-nmz-case-folder-normalize fld))
 	  (unless (mew-nmz-folder-to-nmzdir fld)
 	    (setq mew-nmz-fld-index-alist
 		  (cons (cons fld nmzdir) mew-nmz-fld-index-alist))
@@ -1227,7 +1227,7 @@
 	nmzdirs fld tmp)
     (setq suffix (concat (regexp-opt suffix) "$"))
     (while (setq fld (car flds))
-      (setq fld (mew-nmz-case-folder-normalize (directory-file-name fld)))
+      (setq fld (mew-nmz-case-folder-normalize fld))
       (cond
        ((or (string-match suffix fld)
 	    (string-match "^\\*" fld))
@@ -1392,7 +1392,7 @@
 ;; case:folder MUST not branch
 (defun mew-nmz-folder-index-delete (case:folder)
   (let ((nmzdir (mew-nmz-expand-folder case:folder))
-	(fld (mew-nmz-case-folder-normalize (directory-file-name case:folder))))
+	(fld (mew-nmz-case-folder-normalize case:folder)))
     (when (and (file-exists-p nmzdir) (file-directory-p nmzdir))
       (mew-delete-directory-recursively nmzdir)
       (setq mew-nmz-fld-index-alist
@@ -1457,10 +1457,18 @@
 ;;;
 ;;; mew-nmz-setup
 ;;;
+(defmacro mew-nmz-imap-directory-file-name (fld case)
+  `(condition-case nil
+       (mew-imap-directory-file-name ,fld ,case)
+     (error ,fld)))
+
 (defsubst mew-nmz-case-folder-normalize (case:folder)
   (let ((case (mew-case:folder-case case:folder))
 	(fld (mew-case:folder-folder case:folder))
 	(newcase ""))
+    (setq fld (directory-file-name fld))
+    (when (mew-folder-imapp fld)
+      (setq fld (mew-nmz-imap-directory-file-name fld case)))
     (cond
      ((or (string= fld "")
 	  (string= fld "*")
@@ -1509,14 +1517,17 @@
 	 (file-directory-p nmzdir)
 	 (file-exists-p (expand-file-name "NMZ.i" nmzdir)))))
 
-(defun mew-nmz-gather-indexed-folder (case folders-alist &optional nntp)
-  (let (fld nmzdir fld-index-alist url-fld-alist)
+(defun mew-nmz-gather-indexed-folder (case folders-alist &optional proto)
+  (let ((ocase case)
+	fld nmzdir fld-index-alist url-fld-alist)
     (unless case (setq case ""))
     (while (setq fld (car (car folders-alist)))
+      (when (eq proto 'imap)
+	(setq fld (mew-nmz-imap-directory-file-name fld ocase)))
       (setq fld (directory-file-name (if (string= case "")
 					 fld
 				       (concat case ":" fld))))
-      (when (and (or (not nntp)
+      (when (and (or (not (eq proto 'nntp))
 		     (file-directory-p (mew-expand-folder fld)))
 		 (setq nmzdir (mew-nmz-expand-folder fld))
 		 (file-directory-p nmzdir)
@@ -1568,7 +1579,7 @@
 	 ((mew-folder-imapp (car prefixes))
 	  (setq mew-nmz-imap-case-alist (nreverse case-alist))
 	  (while (setq case (car gcase))
-	    (mew-nmz-gather-indexed-folder case (mew-imap-folder-alist case))
+	    (mew-nmz-gather-indexed-folder case (mew-imap-folder-alist case) 'imap)
 	    (setq gcase (cdr gcase))))
 	 ((mew-folder-popp (car prefixes))
 	  (setq mew-nmz-pop-case-alist (nreverse case-alist))


Mew-win32 メーリングリストの案内