2 ;;; tm-file.el --- tm-view internal method for file extraction
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
9 ;;; $Id: tm-file.el,v 3.0 1995/12/07 11:22:08 morioka Exp $
10 ;;; Keywords: mail, news, MIME, multimedia
12 ;;; This file is part of tm (Tools for MIME).
17 (defun mime-article/extract-file (beg end cal)
18 (let* ((name (or (cdr (assoc "name" cal))
19 (cdr (assoc "x-name" cal))))
20 (encoding (cdr (assq 'encoding cal)))
21 (file-coding-system *noconv*)
24 (expand-file-name name
28 (interactive "DDirectory: ")
33 (interactive "FFilename: ")
34 (expand-file-name file))))))
35 (the-buf (current-buffer))
36 (tmp-buf (generate-new-buffer (file-name-nondirectory filename)))
39 (re-search-forward "\n\n")
40 (append-to-buffer tmp-buf (match-end 0) end)
43 (mime/decode-region encoding (point-min)(point-max))
44 (let ((file-coding-system *noconv*)
45 jka-compr-compression-info-list
46 jam-zcat-filename-list)
56 (set-atype 'mime/content-decoding-condition
58 (method . mime-article/extract-file)
61 (set-atype 'mime/content-decoding-condition
62 '((type . "application/octet-stream")
63 (method . mime-article/extract-file)