tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp and Zope.


From: Kai Großjohann
Subject: Re: Tramp and Zope.
Date: Wed, 31 Jul 2002 17:25:49 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

address@hidden (Artur Maciąg) writes:

>  Debugger entered--Lisp error: (wrong-type-argument stringp (t -1 -1 -1 (0 0) 
> (15668 41650) (0 0) -1 "d?????????" nil 1 -1))
>   string-match("^/tmp_mnt/" (t -1 -1 -1 (0 0) (15668 41650) (0 0) -1 
> "d?????????" nil 1 -1))
>   abbreviate-file-name((t -1 -1 -1 (0 0) (15668 41650) (0 0) -1 "d?????????" 
> nil 1 -1))
>   find-file-noselect("/ftp:address@hidden:/artgabi/portfolio/index_html" nil 
> nil nil)
>   find-file("/ftp:address@hidden:/artgabi/portfolio/index_html" nil)
>   call-interactively(find-file)

Aha.  It seems that find-file-noselect calls expand-file-name and
then runs abbreviate-file-name on the result.

Could you please use M-x ielm RET or M-: to evaluate the following
Lisp expression and tell me what happens?

(expand-file-name "/ftp:address@hidden:/artgabi/portfolio/index_html")

[time passes]

Oh.  I could reproduce the problem.  Aha!  Thanks for the report.
Please try the current CVS or the following patch.  Does it work?

Index: lisp/tramp.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.161
diff -u -r2.161 tramp.el
--- lisp/tramp.el       31 Jul 2002 14:04:09 -0000      2.161
+++ lisp/tramp.el       31 Jul 2002 15:23:51 -0000
@@ -69,6 +69,9 @@
 
 ;;; Code:
 
+;; In the Tramp CVS repository, the version numer is auto-frobbed from
+;; the Makefile, so you should edit the top-level Makefile to change
+;; the version number.
 (defconst tramp-version "2.0.5"
   "This version of tramp.")
 
@@ -1612,10 +1615,11 @@
 (defun tramp-handle-file-truename (filename &optional counter prev-dirs)
   "Like `file-truename' for tramp files."
   (with-parsed-tramp-file-name filename nil
-    ;; Ange-FTP does not support truename processing.  It returns the
-    ;; file name as-is.  So that's what we do, too.
+    ;; Ange-FTP does not support truename processing, but for
+    ;; convenience we pretend it did and forward the call to Ange-FTP
+    ;; anyway.  Ange-FTP then just invokes `identity'.
     (when (tramp-ange-ftp-file-name-p multi-method method)
-      filename)
+      (tramp-invoke-ange-ftp 'file-truename filename))
     (let* ((steps        (tramp-split-string path "/"))
           (pathdir (let ((directory-sep-char ?/))
                      (file-name-as-directory path)))
@@ -1646,7 +1650,9 @@
                      (tramp-make-tramp-file-name
                       multi-method method user host
                       (mapconcat 'identity
-                                 (append '("") (reverse result) (list 
thisstep))
+                                 (append '("")
+                                         (reverse result)
+                                         (list thisstep))
                                  "/")))))
        (cond ((string= "." thisstep)
               (tramp-message-for-buffer multi-method method user host
@@ -1833,7 +1839,11 @@
   (let ((f (buffer-file-name))
        (coding-system-used nil))
     (with-parsed-tramp-file-name f nil
-      ;; This operation is not handled by Ange-FTP!
+      ;; This operation is not handled by Ange-FTP!  Compare this
+      ;; behavior with `file-truename' which Ange-FTP does not really
+      ;; handle, either, but at least it pretends to.  I wonder if
+      ;; Ange-FTP should also pretend to grok
+      ;; `set-visited-file-modtime', for consistency?
       (when (tramp-ange-ftp-file-name-p multi-method method)
        (throw 'tramp-forward-to-ange-ftp
               (tramp-run-real-handler 'set-visited-file-modtime
@@ -3187,11 +3197,7 @@
              (string-match "\\?" name)
              (string-match "\\[.*\\]" name))
          (save-excursion
-           ;; Dissect NAME.
            (let (bufstr)
-             ;; Perhaps invoke Ange-FTP.
-             (when (string= method tramp-ftp-method)
-               (signal 'tramp-run-ange-ftp (list 0)))
              ;; CCC: To do it right, we should quote certain characters
              ;; in the file name, but since the echo command is going to
              ;; break anyway when there are spaces in the file names, we


kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]