[Mew-dist 11729] Patch for kanji filename attachment problem

Shun-ichi GOTO gotoh at example.com
1999年 12月 9日 (木) 23:25:13 JST


後藤@太陽計測です

mew-win32 の方で漢字ファイル名で添付が出来ない、と言う報告がありました。
それに対するpatch です。(mew-1.95b10 用と mew-1.94.1 用)

追ってみると、mew-piolet が file-name-coding-system を束縛しているのが原
因です。これは以前も話題に登ったと思うのですが、再度浮上と言うところでしょ
うか。

mew-1.95b10 辺りでは "てすと.ps" なんて(quoted-printable な)ファイルを添
付してみるとその症状が確認できることと思います。mew-1.94.1 では漢字ファ
イル名ならなんでも発症するかと思います。


コード中のコメントによるとmew-piolet でのその束縛は imgrep で必要である
とのことなので、以下のように変更してみました。

* mew-piolet は file-name-coding-system を束縛しない。
  coding-system-for-read と -for-write だけとする。

* mew-pioalet を新設 ( "a" は argument の a )

  これはpiolet の機能に加えて、に3つ目のcoding-system引数をとり、
   file-name-coding-system を束縛するもの。

* imgrep および imls --grep している部分を mew-piolet から mew-pioalet
  に変更した。mew-pioalet が必要なのは他にもあるかな?

というものです。

当方、Meadow 1.10 (emacs20.4) + Win2000 でのみ動作を確認しています。
問題があればご指摘下さい。

--- Regards,
 Shun-ichi Goto  <gotoh at example.com>
   R&D Group, TAIYO Corp., Tokyo, JAPAN
-------------- next part --------------
Index: mew-mule0.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.94/mew-mule0.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mew-mule0.el	1999/12/09 13:35:11	1.1.1.1
+++ mew-mule0.el	1999/12/09 13:59:29	1.2
@@ -92,6 +92,10 @@
   (` (let ((call-process-hook nil))
        (,@ body))))
 
+(defmacro mew-pioalet (input output arg &rest body)
+  (` (let ((call-process-hook nil))
+       (,@ body))))
+
 (defmacro mew-flet (&rest body)
   (` (let (jam-zcat-filename-list
 	   jka-compr-compression-info-list)
Index: mew-mule2.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.94/mew-mule2.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mew-mule2.el	1999/12/09 13:35:11	1.1.1.1
+++ mew-mule2.el	1999/12/09 13:59:32	1.2
@@ -214,6 +214,12 @@
 	     (cons (, input) (, output))))
        (,@ body))))
 
+(defmacro mew-pioalet (input output arg &rest body)
+  (` (let ((call-process-hook nil)
+	   (default-process-coding-system
+	     (cons (, input) (, output))))
+       (,@ body))))
+
 (defmacro mew-flet (&rest body)
   (` (let ((file-coding-system          '*noconv*)
 	   (file-coding-system-for-read '*noconv*)
Index: mew-mule3.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.94/mew-mule3.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mew-mule3.el	1999/12/09 13:35:11	1.1.1.1
+++ mew-mule3.el	1999/12/09 13:59:37	1.2
@@ -152,9 +152,15 @@
 
 (defmacro mew-piolet (read write &rest body)
   `(let ((call-process-hook nil)
- 	 (file-name-coding-system ,write) ;; for imgrep
 	 (coding-system-for-read  ,read)
 	 (coding-system-for-write ,write))
+     , at example.com))
+
+(defmacro mew-pioalet (read write arg &rest body)
+  `(let ((call-process-hook nil)
+	 (coding-system-for-read  ,read)
+	 (coding-system-for-write ,write)
+	 (file-name-coding-system ,arg))
      , at example.com))
 
 (defmacro mew-flet (&rest body)
Index: mew-pick.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.94/mew-pick.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mew-pick.el	1999/12/09 13:35:11	1.1.1.1
+++ mew-pick.el	1999/12/09 13:59:40	1.2
@@ -214,7 +214,7 @@
 	(setq arg "--dupchecktarget=message-id+subject"))
        (t
 	(setq arg (format "--expression=%s" pattern))))
-      (mew-piolet mew-cs-autoconv mew-cs-pick
+      (mew-pioalet mew-cs-autoconv mew-cs-pick
 	(mew-im-call-process nil mew-prog-imgrep
 			     (format "--src=%s" folder) arg range))
       (goto-char (point-min))
Index: mew-scan.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.94/mew-scan.el,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- mew-scan.el	1999/12/09 13:36:45	1.1.1.2
+++ mew-scan.el	1999/12/09 13:59:44	1.2
@@ -127,7 +127,7 @@
 	    (setq mew-summary-buffer-config mew-config-imget)
 	    (setq mew-summary-buffer-error nil)
 	    (setq mew-summary-buffer-wrong-pws nil)
-	    (mew-piolet read mew-cs-pick
+	    (mew-pioalet read mew-cs-pick
 	     (setq mew-summary-buffer-process
 		   (apply (function start-process) 
 			  prog;; name
-------------- next part --------------
? .cvsignore
Index: mew-mule0.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.95/mew-mule0.el,v
retrieving revision 1.1.1.1
diff -u -b -F(def -r1.1.1.1 mew-mule0.el
--- mew-mule0.el	1999/12/09 10:24:20	1.1.1.1
+++ mew-mule0.el	1999/12/09 13:31:41
@@ -92,6 +92,10 @@ (defmacro mew-piolet (input output &rest
   (` (let ((call-process-hook nil))
        (,@ body))))
 
+(defmacro mew-pioalet (input output arg &rest body)
+  (` (let ((call-process-hook nil))
+       (,@ body))))
+
 (defmacro mew-flet (&rest body)
   (` (let (jam-zcat-filename-list
 	   jka-compr-compression-info-list)
Index: mew-mule2.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.95/mew-mule2.el,v
retrieving revision 1.1.1.1
diff -u -b -F(def -r1.1.1.1 mew-mule2.el
--- mew-mule2.el	1999/12/09 10:24:20	1.1.1.1
+++ mew-mule2.el	1999/12/09 13:31:41
@@ -229,6 +229,12 @@ 	   (default-process-coding-system
 	     (cons (, input) (, output))))
        (,@ body))))
 
+(defmacro mew-pioalet (input output arg &rest body)
+  (` (let ((call-process-hook nil)
+	   (default-process-coding-system
+	     (cons (, input) (, output))))
+       (,@ body))))
+
 (defmacro mew-flet (&rest body)
   (` (let ((file-coding-system          '*noconv*)
 	   (file-coding-system-for-read '*noconv*)
Index: mew-mule3.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.95/mew-mule3.el,v
retrieving revision 1.1.1.1
diff -u -b -F(def -r1.1.1.1 mew-mule3.el
--- mew-mule3.el	1999/12/09 10:24:20	1.1.1.1
+++ mew-mule3.el	1999/12/09 13:31:41
@@ -155,9 +155,15 @@ (defmacro mew-plet (&rest body)
 
 (defmacro mew-piolet (read write &rest body)
   `(let ((call-process-hook nil)
- 	 (file-name-coding-system ,write) ;; for imgrep
 	 (coding-system-for-read  ,read)
 	 (coding-system-for-write ,write))
+     , at example.com))
+
+(defmacro mew-pioalet (read write arg &rest body)
+  `(let ((call-process-hook nil)
+	 (coding-system-for-read  ,read)
+	 (coding-system-for-write ,write)
+	 (file-name-coding-system ,arg))
      , at example.com))
 
 (defmacro mew-flet (&rest body)
Index: mew-pick.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.95/mew-pick.el,v
retrieving revision 1.1.1.1
diff -u -b -F(def -r1.1.1.1 mew-pick.el
--- mew-pick.el	1999/12/09 10:24:21	1.1.1.1
+++ mew-pick.el	1999/12/09 13:31:41
@@ -214,8 +214,8 @@ (defun mew-summary-pick (folder pattern 
 	(setq arg "--dupchecktarget=message-id+subject"))
        (t
 	(setq arg (format "--expression=%s" pattern))))
-      (mew-piolet
-       mew-cs-autoconv mew-cs-pick
+      (mew-pioalet
+	  mew-cs-autoconv mew-cs-pick mew-cs-pick
        (mew-im-call-process nil mew-prog-imgrep
 			    (format "--src=%s" folder) arg range))
       (goto-char (point-min))
Index: mew-scan.el
===================================================================
RCS file: /usr/home/gotoh/Repository/mew-1.95/mew-scan.el,v
retrieving revision 1.1.1.1
diff -u -b -F(def -r1.1.1.1 mew-scan.el
--- mew-scan.el	1999/12/09 10:24:21	1.1.1.1
+++ mew-scan.el	1999/12/09 13:31:41
@@ -134,8 +134,8 @@ (defun mew-summary-scan-body (prog mode 
 	    (setq mew-summary-buffer-config mew-config-imget)
 	    (setq mew-summary-buffer-error nil)
 	    (setq mew-summary-buffer-wrong-pws nil)
-	    (mew-piolet
-	     read mew-cs-pick
+	    (mew-pioalet
+		read mew-cs-pick mew-cs-pick
 	     (setq mew-summary-buffer-process
 		   (apply (function start-process) 
 			  prog;; name


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