日記の本来の目的に則ってみる。まずは、Application/Octet-stream なんだけど、message にそのまま表示出来そうなものは表示してしまうもの。SEMI 系の MUA の人が多い ML で便利。
(defadvice mew-mime-application/octet-stream (after insert-text activate) (when (and cte (or (string= "7bit" cte) (string= "8bit" cte) (and (or (string-match "base64" cte) (string-match "quoted-printable" cte)) params (member '("type" "patch") params)) (and (or (string-match "base64" cte) (string-match "quoted-printable" cte)) params (member '("type" "gzip") params)) (and (or (string-match "base64" cte) (string-match "quoted-printable" cte)) fl (string-match "\\.\\(el\\|txt\\|diff\\|patch\\)\\(\\.\\|$\\)" fl)))) (let ((head (concat "Application/Octet-Stream: " (format "CTE: %s" cte) (if fl (format ", Filename: %s" fl) ""))) text pos) (save-excursion (set-buffer cache) (setq text (buffer-substring begin end))) (when (or (and params (member '("type" "gzip") params)) (and fl (string-match "\.gz$" fl))) (with-temp-buffer (insert text) (mew-plet 'undecided 'binary (call-process-region (point-min) (point-max) "gunzip" t t nil "-c")) (setq text (buffer-substring (point-min) (point-max))))) (setq text (decode-coding-string text 'undecided)) (mew-erase-buffer) (put-text-property 0 (length head) 'face 'mew-face-header-xmew head) (mew-elet (insert head "\n") (setq pos (point)) (insert text) (mew-highlight-body-region pos (point-max)) (set-buffer-modified-p nil)))))
ML に出せない(出す気もない)寄生虫たちに日の目をみせてあげる :-) こと。(それじゃ全然日記じゃないじゃん、という気もするが)