[mew-dist 26178] アーカイブの実験

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
2005年 4月 5日 (火) 19:02:02 JST


山本です。

現在、古いメールアーカイブにおいて、メールアドレスのドメイン部分をxxx
に置き換える作業をしています。

最近のメールアーカイブは、自動的に xxx に置き換わっています。

パッチの中に @ がある場合、どのように振る舞えばいいのか、例題を探し出せ
なかったので、実験させて下さい。

以下に、以前木下さんが流したパッチを付けます。

--かず
-------------- next part --------------

* Removing string-bytes().
* Replace ":" with "_" in boundary strings.

(backport from Mew 4 on 2003-10-01)

--- mew-3.3.orig/mew-encode.el
+++ mew-3.3/mew-encode.el
@@ -733,7 +733,8 @@
   (unless string (setq string "Next_Part"))
   (format mew-default-boundary
 	  string
-	  (mew-replace-character (current-time-string) 32 ?_)
+	  (mew-replace-character
+	   (mew-replace-character (current-time-string) 32 ?_) ?: ?_)
 	  (mew-random-string 3 t)))
 
 (defun mew-encode-multipart (syntax path depth &optional buffered)
--- mew-3.3.orig/mew-func.el
+++ mew-3.3/mew-func.el
@@ -996,11 +996,14 @@
      , at example.com))
 
 (defsubst mew-region-bytes (beg end buf)
-  (if (fboundp 'string-bytes)
-      (save-excursion
-	(set-buffer buf)
-	(string-bytes (mew-buffer-substring beg end)))
-    (- end beg)))
+  (save-excursion
+    (set-buffer buf)
+    (save-restriction
+      (narrow-to-region beg end)
+      (mew-set-buffer-multibyte nil)
+      (prog1
+	  (- (point-max) (point-min))
+	(mew-set-buffer-multibyte t)))))
 
 (defun mew-count-lines (beg end &optional skip-regex)
   "Return number of lines between BEG and END."


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