[mew-dist 24964] Re: refile by character code

Tatsuya Kinoshita tats at example.com
2004年 5月 30日 (日) 20:43:50 JST


On March 30, 2002, [mew-dist 20690],
tats (at iris.ne.jp) wrote:

> mew-refile-guess-alistで指定した日本語(non-ASCII)の判定で、うまく
> マッチしてくれない、`o', `M-o', `C-u o'で結果が異なる、という場合
> があることに気づいたので、修正してパッチを作りました。
> 
> mew-refile-guess-fastがtだと、高速化のため`Subject:'以外のフィー
> ルドについてはデコードを省略する場合があります。

パッチは適用されておらず、最新のMew 4でもまだ直っていません。

とりあえずmew-refile-guess-fastの処理は外して、Subjectだけは
non-ASCIIを扱えるようにして、最新のMewに適用できるパッチを作りました。

-- 
木下達也
-------------- next part --------------

 This patch is written by Tatsuya Kinoshita.  Copyright is disclaimed.

--- mew-refile.el	21 May 2004 03:25:34 -0000	1.113
+++ mew-refile.el	30 May 2004 11:33:01 -0000
@@ -669,7 +669,7 @@
 	    (setq delbuf t)
 	    (set-buffer buf)
 	    (mew-erase-buffer)
-	    (mew-insert-message fld msg mew-cs-autoconv
+	    (mew-insert-message fld msg mew-cs-text-for-read
 				mew-header-reasonable-size)
 	    (goto-char (point-min))
 	    (if (and (re-search-forward (concat "^$\\|^" mew-subj:) nil t)
@@ -741,8 +741,15 @@
     (setq mew-inherit-refile-case  (mew-case:folder-case fld))
     (setq mew-inherit-refile-proto (mew-case:folder-folder fld))
     (with-temp-buffer
-      (mew-insert-message fld msg mew-cs-autoconv
+      (mew-insert-message fld msg mew-cs-text-for-read
 			  mew-header-reasonable-size)
+      (goto-char (point-min))
+      (if (and (re-search-forward (concat "^$\\|^" mew-subj:) nil t)
+	       (not (looking-at "^$")))
+	  (let ((med (point)))
+	    (forward-line)
+	    (mew-header-goto-next)
+	    (mew-header-decode-region mew-subj: med (point))))
       (setq guess (mew-refile-guess nil t)))
     (mew-window-configure 'message)
     ;; message buffer


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