4
|
1 ;;;
|
|
2 ;;; tm-ftp: anonymous ftp processor for tm-view
|
|
3 ;;;
|
|
4 ;;; by MASUTANI Yasuhiro <masutani@me.es.osaka-u.ac.jp> (1994/11/ 5)
|
|
5 ;;;
|
|
6 ;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp> (1994/11/ 8)
|
|
7 ;;; and OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> (1994/11/11)
|
|
8 ;;;
|
10
|
9 ;;; $Id: tm-ftp.el,v 1.3 1996/12/29 00:15:13 steve Exp $
|
4
|
10 ;;;
|
|
11
|
|
12 (require 'tm-view)
|
|
13 (require 'ange-ftp)
|
|
14
|
|
15 (defvar mime/dired-function
|
|
16 (if mime/use-multi-frame
|
|
17 (function dired-other-frame)
|
|
18 (function dired)
|
|
19 ))
|
|
20
|
|
21 (defun mime/decode-message/external-ftp (beg end cal)
|
|
22 (let ((access-type (cdr (assoc "access-type" cal)))
|
|
23 (site (cdr (assoc "site" cal)))
|
|
24 (directory (cdr (assoc "directory" cal)))
|
|
25 (name (cdr (assoc "name" cal)))
|
|
26 (mode (cdr (assoc "mode" cal)))
|
|
27 (pathname))
|
|
28 (setq pathname
|
|
29 (concat "/anonymous@" site ":" directory))
|
|
30 (message (concat "Accessing " pathname "/" name "..."))
|
|
31 (switch-to-buffer mime::article/preview-buffer)
|
|
32 (funcall mime/dired-function pathname)
|
|
33 (goto-char (point-min))
|
|
34 (search-forward name)
|
|
35 ))
|
|
36
|
|
37 (set-atype 'mime/content-decoding-condition
|
|
38 '((type . "message/external-body")
|
|
39 ("access-type" . "anon-ftp")
|
|
40 (method . mime/decode-message/external-ftp)
|
|
41 ))
|
|
42
|
|
43 (provide 'tm-ftp)
|