Mercurial > emacs
comparison lisp/net/tramp-ftp.el @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | f042e7c0fe20 |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
1 ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*- | 1 ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*- |
2 | 2 |
3 ;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. | 3 ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Michael Albinus <Michael.Albinus@alcatel.de> | 5 ;; Author: Michael Albinus <Michael.Albinus@alcatel.de> |
6 ;; Keywords: comm, processes | 6 ;; Keywords: comm, processes |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
23 ;; Boston, MA 02111-1307, USA. | 23 ;; Boston, MA 02111-1307, USA. |
24 | 24 |
25 ;;; Commentary: | 25 ;;; Commentary: |
26 | 26 |
27 ;; Convenience functions for calling Ange-FTP (and maybe EFS, later on) | 27 ;; Convenience functions for calling Ange-FTP from Tramp. |
28 ;; from Tramp. Most of them are displaced from tramp.el. | 28 ;; Most of them are displaced from tramp.el. |
29 | 29 |
30 ;;; Code: | 30 ;;; Code: |
31 | 31 |
32 (require 'tramp) | 32 (require 'tramp) |
33 | 33 |
96 (require 'ange-ftp)) | 96 (require 'ange-ftp)) |
97 (let ((ange-ftp-name-format | 97 (let ((ange-ftp-name-format |
98 (list (nth 0 tramp-file-name-structure) | 98 (list (nth 0 tramp-file-name-structure) |
99 (nth 3 tramp-file-name-structure) | 99 (nth 3 tramp-file-name-structure) |
100 (nth 2 tramp-file-name-structure) | 100 (nth 2 tramp-file-name-structure) |
101 (nth 4 tramp-file-name-structure)))) | 101 (nth 4 tramp-file-name-structure))) |
102 ;; ange-ftp uses `ange-ftp-ftp-name-arg' and `ange-ftp-ftp-name-res' | |
103 ;; for optimization in `ange-ftp-ftp-name'. If Tramp wasn't active, | |
104 ;; there could be incorrect values from previous calls in case the | |
105 ;; "ftp" method is used in the Tramp file name. So we unset | |
106 ;; those values. | |
107 (ange-ftp-ftp-name-arg "") | |
108 (ange-ftp-ftp-name-res nil)) | |
102 (cond | 109 (cond |
103 ;; If argument is a symlink, 'file-directory-p` and 'file-exists-p` | 110 ;; If argument is a symlink, `file-directory-p' and `file-exists-p' |
104 ;; call the traversed file recursively. So we cannot disable the | 111 ;; call the traversed file recursively. So we cannot disable the |
105 ;; file-name-handler this case. | 112 ;; file-name-handler this case. |
106 ((memq operation '(file-directory-p file-exists-p)) | 113 ((memq operation '(file-directory-p file-exists-p)) |
107 (apply 'ange-ftp-hook-function operation args)) | 114 (apply 'ange-ftp-hook-function operation args)) |
108 ;; Normally, the handlers must be discarded | 115 ;; Normally, the handlers must be discarded |
135 ;; * In case of "/ftp:host:file" this works only for functions which | 142 ;; * In case of "/ftp:host:file" this works only for functions which |
136 ;; are defined in `tramp-file-name-handler-alist'. Call has to be | 143 ;; are defined in `tramp-file-name-handler-alist'. Call has to be |
137 ;; pretended in `tramp-file-name-handler' otherwise. | 144 ;; pretended in `tramp-file-name-handler' otherwise. |
138 ;; Furthermore, there are no backup files on FTP hosts. | 145 ;; Furthermore, there are no backup files on FTP hosts. |
139 ;; Worth further investigations. | 146 ;; Worth further investigations. |
147 ;; * Map /multi:ssh:out@gate:ftp:kai@real.host:/path/to.file | |
148 ;; on Ange-FTP gateways. | |
140 | 149 |
150 ;;; arch-tag: 759fb338-5c63-4b99-bd36-b4d59db91cff | |
141 ;;; tramp-ftp.el ends here | 151 ;;; tramp-ftp.el ends here |