Definition of `mime-edit-mode' must be previous to `add-minor-mode'.
[elisp/semi.git] / mime-play.el
index 698b2bb..cfe59ad 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1995/9/26 (separated from tm-view.el)
 ;;     Renamed: 1997/2/21 from tm-play.el
-;; Version: $Id: mime-play.el,v 0.10 1997-02-28 05:14:54 tmorioka Exp $
+;; Version: $Id: mime-play.el,v 0.13 1997-03-10 13:39:57 morioka Exp $
 ;; Keywords: MIME, multimedia, mail, news
 
 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
@@ -29,6 +29,7 @@
 
 (require 'mime-view)
 (require 'alist)
+(require 'filename)
 
   
 ;;; @ content decoder
            )
        (if method
            (let ((file (make-temp-name
-                        (expand-file-name "TM" mime/tmp-dir)))
+                        (expand-file-name "TM" mime-temp-directory)))
                  b args)
              (if (nth 1 method)
                  (setq b beg)
 
 (defun mime-article/decode-message/partial (beg end cal)
   (goto-char beg)
-  (let* ((root-dir (expand-file-name
-                   (concat "m-prts-" (user-login-name)) mime/tmp-dir))
+  (let* ((root-dir
+         (expand-file-name
+          (concat "m-prts-" (user-login-name)) mime-temp-directory))
         (id (cdr (assoc "id" cal)))
         (number (cdr (assoc "number" cal)))
         (total (cdr (assoc "total" cal)))
       )))
 
 
+;;; @ message/external-body
+;;;
+
+(defvar mime-article/dired-function
+  (if mime/use-multi-frame
+      (function dired-other-frame)
+    (function mime-article/dired-function-for-one-frame)
+    ))
+
+(defun mime-article/dired-function-for-one-frame (dir)
+  (let ((win (or (get-buffer-window mime::article/preview-buffer)
+                (get-largest-window))))
+    (select-window win)
+    (dired dir)
+    ))
+
+(defun mime-article/decode-message/external-ftp (beg end cal)
+  (let* ((access-type (cdr (assoc "access-type" cal)))
+        (site (cdr (assoc "site" cal)))
+        (directory (cdr (assoc "directory" cal)))
+        (name (cdr (assoc "name" cal)))
+        (mode (cdr (assoc "mode" cal)))
+        (pathname (concat "/anonymous@" site ":" directory))
+        )
+    (message (concat "Accessing " (expand-file-name name pathname) "..."))
+    (funcall mime-article/dired-function pathname)
+    (goto-char (point-min))
+    (search-forward name)
+    ))
+
+
 ;;; @ rot13-47
 ;;;