]> code.delx.au - gnu-emacs/blobdiff - lisp/net/tramp-ftp.el
(date, entry, number, original-date): Add defvars.
[gnu-emacs] / lisp / net / tramp-ftp.el
index 1d2ab9083f95794e8f55a4ede910ef472f91fa76..53cc392ad7ab84a4619028ffc83c7374ac37fbc2 100644 (file)
@@ -1,8 +1,8 @@
-;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*-
+;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
 
-;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-;; Author: Michael Albinus <Michael.Albinus@alcatel.de>
+;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 
 ;; This file is part of GNU Emacs.
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
-;; Convenience functions for calling Ange-FTP (and maybe EFS, later on)
-;; from Tramp.  Most of them are displaced from tramp.el.
+;; Convenience functions for calling Ange-FTP from Tramp.
+;; Most of them are displaced from tramp.el.
 
 ;;; Code:
 
@@ -98,11 +98,18 @@ pass to the OPERATION."
           (list (nth 0 tramp-file-name-structure)
                 (nth 3 tramp-file-name-structure)
                 (nth 2 tramp-file-name-structure)
-                (nth 4 tramp-file-name-structure))))
+                (nth 4 tramp-file-name-structure)))
+         ;; ange-ftp uses `ange-ftp-ftp-name-arg' and `ange-ftp-ftp-name-res'
+         ;; for optimization in `ange-ftp-ftp-name'. If Tramp wasn't active,
+         ;; there could be incorrect values from previous calls in case the
+         ;; "ftp" method is used in the Tramp file name. So we unset
+         ;; those values.
+         (ange-ftp-ftp-name-arg "")
+         (ange-ftp-ftp-name-res nil))
       (cond
-       ;; If argument is a symlink, 'file-directory-p` and 'file-exists-p`
+       ;; If argument is a symlink, `file-directory-p' and `file-exists-p'
        ;; call the traversed file recursively. So we cannot disable the
-       ;;file-name-handler this case.
+       ;; file-name-handler this case.
        ((memq operation '(file-directory-p file-exists-p))
        (apply 'ange-ftp-hook-function operation args))
        ;; Normally, the handlers must be discarded
@@ -137,5 +144,8 @@ pass to the OPERATION."
 ;;   pretended in `tramp-file-name-handler' otherwise.
 ;;   Furthermore, there are no backup files on FTP hosts.
 ;;   Worth further investigations.
+;; * Map /multi:ssh:out@gate:ftp:kai@real.host:/path/to.file
+;;   on Ange-FTP gateways.
 
+;;; arch-tag: 759fb338-5c63-4b99-bd36-b4d59db91cff
 ;;; tramp-ftp.el ends here