annotate lisp/tm/tm-ftp.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents d95e72db5c07
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
1 ;;; tm-ftp.el --- tm-view internal method for anonymous ftp
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
2
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
4
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
5 ;; Author: MASUTANI Yasuhiro <masutani@me.es.osaka-u.ac.jp>
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
6 ;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
7 ;; Created: 1994/11/5
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
8 ;; Version: $Id: tm-ftp.el,v 1.5 1997/02/16 01:29:33 steve Exp $
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
9 ;; Keywords: anonymous ftp, MIME, multimedia, mail, news
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
10
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
11 ;; This file is part of tm (Tools for MIME).
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
12
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
13 ;; This program is free software; you can redistribute it and/or
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
14 ;; modify it under the terms of the GNU General Public License as
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
15 ;; published by the Free Software Foundation; either version 2, or (at
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
16 ;; your option) any later version.
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
17
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
18 ;; This program is distributed in the hope that it will be useful, but
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
21 ;; General Public License for more details.
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
22
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
23 ;; You should have received a copy of the GNU General Public License
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
26 ;; Boston, MA 02111-1307, USA.
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
27
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
28 ;;; Code:
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
29
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
30 (require 'tm-view)
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
31
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
32 (defvar mime-view-ftp-module
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
33 (if (< emacs-major-version 19)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
34 'ange-ftp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
35 "*Module for ftp file access.")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
36
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
37 (and mime-view-ftp-module
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
38 (require mime-view-ftp-module)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
39 )
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
40
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
41 (defvar mime-article/dired-function
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
42 (if mime/use-multi-frame
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
43 (function dired-other-frame)
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
44 (function mime-article/dired-function-for-one-frame)
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
45 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
46
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
47 (defun mime-article/dired-function-for-one-frame (dir)
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
48 (let ((win (or (get-buffer-window mime::article/preview-buffer)
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
49 (get-largest-window))))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
50 (select-window win)
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
51 (dired dir)
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
52 ))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
53
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
54 (defun mime-article/decode-message/external-ftp (beg end cal)
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
55 (let* ((access-type (cdr (assoc "access-type" cal)))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
56 (site (cdr (assoc "site" cal)))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
57 (directory (cdr (assoc "directory" cal)))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
58 (name (cdr (assoc "name" cal)))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
59 (mode (cdr (assoc "mode" cal)))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
60 (pathname (concat "/anonymous@" site ":" directory))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
61 )
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
62 (message (concat "Accessing " (expand-file-name name pathname) "..."))
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
63 (funcall mime-article/dired-function pathname)
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
64 (goto-char (point-min))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
65 (search-forward name)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
66 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
67
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
68 (set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
69 '((type . "message/external-body")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
70 ("access-type" . "anon-ftp")
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
71 (method . mime-article/decode-message/external-ftp)
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
72 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
73
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
74
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
75 ;;; @ end
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
76 ;;;
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
77
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
78 (provide 'tm-ftp)
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
79
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 10
diff changeset
80 ;;; tm-ftp.el ends here