[mew-dist 28865] Re: encoded-word の中に左括弧

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
2009年 2月 2日 (月) 17:10:55 JST


山本です。

>     From: ...
>     To: 村田(むらた) <address>, address2, address3
>         ^^^^^^^^^^^^^ ここがまとめて1つのencoded-word
> 
>         ↓ a
> 
>     To: ...
>     Cc: 村田
> 
>   これは仕方ないのでしょうか? 救うことは出来ませんか?

以下のパッチで、メールアドレスが1つのときのみ救えそうです。
どうでしょうか?

--かず

Index: mew-header.el
===================================================================
RCS file: /cvsroot/mew/mew/mew-header.el,v
retrieving revision 1.47
diff -c -r1.47 mew-header.el
*** mew-header.el	21 Jan 2009 05:54:55 -0000	1.47
--- mew-header.el	2 Feb 2009 08:09:18 -0000
***************
*** 359,365 ****
  	    ;; broken quoted string cannot be rescued because
  	    ;; the separator cannot be distinguished
  	    (if (> tmp-cnt 0) (funcall do-cons-ret))
! 	    (funcall do-clear))))
      ;; main
      (catch 'max
        (while (< i len)
--- 359,371 ----
  	    ;; broken quoted string cannot be rescued because
  	    ;; the separator cannot be distinguished
  	    (if (> tmp-cnt 0) (funcall do-cons-ret))
! 	    (funcall do-clear)))
! 	 (do-rescue
! 	  (lambda (var)
! 	    (save-match-data
! 	      (if (and addrp (string-match "<\\([^>]+\\)>" var))
! 		  (setq ret (cons (mew-match-string 1 var) ret))
! 		(funcall do-cons-ret))))))
      ;; main
      (catch 'max
        (while (< i len)
***************
*** 379,390 ****
  	 (t
  	  (funcall do-copy)))
  	(setq i (1+ i)))
!       (when (> tmp-cnt 0)
! 	;; broken quoted string can be rescued if it appears solely
! 	(save-match-data
! 	  (if (and addrp (string-match "<\\([^>]+\\)>" tmp))
! 	      (setq ret (cons (mew-match-string 1 tmp) ret))
! 	    (funcall do-cons-ret)))))
      (setq ret (delete nil ret))
      (when allow-spc
        (setq ret (mapcar (lambda (str)
--- 385,396 ----
  	 (t
  	  (funcall do-copy)))
  	(setq i (1+ i)))
!       ;; broken quoted string can be rescued if it appears solely
!       (cond
!        ((> par-cnt 0)
! 	(funcall do-rescue str))
!        ((> tmp-cnt 0)
! 	(funcall do-rescue tmp))))
      (setq ret (delete nil ret))
      (when allow-spc
        (setq ret (mapcar (lambda (str)



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