[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tramp Trips
From: |
Tak Ota |
Subject: |
Re: Tramp Trips |
Date: |
Wed, 07 Aug 2002 11:04:58 -0700 (PDT) |
Wed, 07 Aug 2002 12:34:23 +0200: address@hidden (Kai Großjohann) wrote:
> What's tramp-file-name-structure when this happens? It should be:
>
> /----
> | tramp-file-name-structure's value is
> |
> ("\\`/\\(\\([a-zA-Z0-9-]+\\):\\)?\\(\\([^:@/]+\\)@\\)?\\([^:/]+\\):\\(.*\\)\\'"
> 2 4 5 6)
> |
> |
> | *List of five elements (REGEXP METHOD USER HOST FILE), detailing the tramp
> file name structure.
> |
> | The first element REGEXP is a regular expression matching a tramp file
> | name. The regex should contain parentheses around the method name,
> | the user name, the host name, and the file name parts.
> |
> | The second element METHOD is a number, saying which pair of
> | parentheses matches the method name. The third element USER is
> | similar, but for the user name. The fourth element HOST is similar,
> | but for the host name. The fifth element FILE is for the file name.
> | These numbers are passed directly to `match-string', which see. That
> | means the opening parentheses are counted to identify the pair.
> |
> | See also `tramp-file-name-regexp' and `tramp-make-tramp-file-format'.
> |
> | You can customize this variable.
> |
> | Defined in `tramp'.
> \----
This is what I get. It looks slightly different from yours.
tramp-file-name-structure's value is
("\\`/r\\(@\\([a-z0-9]+\\)\\)?:\\(\\([-a-z0-9_#]+\\)@\\)?\\([-a-z0-9.]+\\):\\(.*\\)\\'"
2 4 5 6)
*List of five elements (REGEXP METHOD USER HOST FILE), detailing the tramp
file name structure.
The first element REGEXP is a regular expression matching a tramp file
name. The regex should contain parentheses around the method name,
the user name, the host name, and the file name parts.
The second element METHOD is a number, saying which pair of
parentheses matches the method name. The third element USER is
similar, but for the user name. The fourth element HOST is similar,
but for the host name. The fifth element FILE is for the file name.
These numbers are passed directly to `match-string', which see. That
means the opening parentheses are counted to identify the pair.
See also `tramp-file-name-regexp' and `tramp-make-tramp-file-format'.
You can customize this variable.
Defined in `tramp'.
M-x tramp-version returns this.
"$Id: tramp.el,v 2.0.2.3 2001/03/28 21:44:30 grossjoh Exp $"
> What happens when you eval the following Lisp expression? (The
> second line shows the result when I do it.)
>
> (tramp-dissect-file-name "/address@hidden:~/")
> [cl-struct-tramp-file-name nil "sm" "ota" "xenon" "~/"]
>
> The "sm" is wrong. I think it's due to our broken local config. It
> should be "ssh".
It ends up with the same error as this.
Debugger entered--Lisp error: (error "Not a tramp file name:
/address@hidden:~/")
signal(error ("Not a tramp file name: /address@hidden:~/"))
error("Not a tramp file name: %s" "/address@hidden:~/")
(if (string-match (nth 0 tramp-file-name-structure) name) nil (error "Not a
tramp file name: %s" name))
(unless (string-match (nth 0 tramp-file-name-structure) name) (error "Not a
tramp file name: %s" name))
(progn (unless (string-match ... name) (error "Not a tramp file name: %s"
name)) (setq method (or ... tramp-default-method)) (if (member method
tramp-multi-methods) (tramp-dissect-multi-file-name name) (make-tramp-file-name
:multi-method nil :method method :user ... :host ... :path ...)))
(unwind-protect (progn (unless ... ...) (setq method ...) (if ... ... ...))
(set-match-data save-match-data-internal))
(let ((save-match-data-internal ...)) (unwind-protect (progn ... ... ...)
(set-match-data save-match-data-internal)))
(save-match-data (unless (string-match ... name) (error "Not a tramp file
name: %s" name)) (setq method (or ... tramp-default-method)) (if (member method
tramp-multi-methods) (tramp-dissect-multi-file-name name) (make-tramp-file-name
:multi-method nil :method method :user ... :host ... :path ...)))
(let (method) (save-match-data (unless ... ...) (setq method ...) (if ... ...
...)))
tramp-dissect-file-name("/address@hidden:~/")