25 |
This file documents @tramp{}, a remote file editing package for Emacs and |
This file documents @tramp{}, a remote file editing package for Emacs and |
26 |
XEmacs. |
XEmacs. |
27 |
|
|
28 |
Copyright @copyright{} 1999, 2000 Free Software Foundation, Inc. |
Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software |
29 |
|
Foundation, Inc. |
30 |
|
|
31 |
Permission is granted to make and distribute verbatim copies of this |
Permission is granted to make and distribute verbatim copies of this |
32 |
manual provided the copyright notice and this permission notice are |
manual provided the copyright notice and this permission notice are |
1150 |
@node Filename Syntax |
@node Filename Syntax |
1151 |
@section @tramp{} filename conventions |
@section @tramp{} filename conventions |
1152 |
|
|
1153 |
To access the file <path> on the remote machine <machine> you would |
On Emacs, the Ange-FTP and Tramp filenames use a unified syntax. On |
1154 |
specify the filename @file{/[<machine>]<path>}. (The square brackets |
XEmacs, EFS and Tramp use different formats for the filenames. |
1155 |
are part of the file name.) This will connect to <machine> and transfer |
Therefore, the following will describe the Emacs and XEmacs cases |
1156 |
the file using the default method. @xref{Default Method}. |
separately. |
1157 |
|
|
1158 |
|
On Emacs, to access the file @var{path} on the remote machine |
1159 |
|
@var{machine} you would specify the filename |
1160 |
|
@file{/@var{machine}:@var{path}}. This will connect to @var{machine} |
1161 |
|
and transfer the file using the default method. @xref{Default |
1162 |
|
Method}. On XEmacs, use @file{/[@var{machine}]@var{path}}. (The |
1163 |
|
square brackets are part of the file name.) |
1164 |
|
|
1165 |
Some examples of @tramp{} filenames are: |
Some examples of @tramp{} filenames are shown below. In each case, |
1166 |
|
the Emacs-style filename is shown first, then the XEmacs-style |
1167 |
|
filename. |
1168 |
|
|
1169 |
@table @file |
@table @file |
1170 |
@item /[melancholia].emacs |
@item /melancholia:.emacs |
1171 |
|
@itemx /[melancholia].emacs |
1172 |
Edit the file @file{.emacs} in your home directory on the machine |
Edit the file @file{.emacs} in your home directory on the machine |
1173 |
@code{melancholia}. |
@code{melancholia}. |
1174 |
|
|
1175 |
@item /[melancholia.danann.net].emacs |
@item /melancholia.danann.net:.emacs |
1176 |
|
@itemx /[melancholia.danann.net].emacs |
1177 |
This edits the same file, using the fully qualified domain name of |
This edits the same file, using the fully qualified domain name of |
1178 |
the machine. |
the machine. |
1179 |
|
|
1180 |
@item /[melancholia]~/.emacs |
@item /melancholia:~/.emacs |
1181 |
|
@itemx /[melancholia]~/.emacs |
1182 |
This also edits the same file --- the @file{~} is expanded to your |
This also edits the same file --- the @file{~} is expanded to your |
1183 |
home directory on the remote machine, just like it is locally. |
home directory on the remote machine, just like it is locally. |
1184 |
|
|
1185 |
@item /[melancholia]~daniel/.emacs |
@item /melancholia:~daniel/.emacs |
1186 |
|
@itemx /[melancholia]~daniel/.emacs |
1187 |
This edits the file @file{.emacs} in the home directory of the user |
This edits the file @file{.emacs} in the home directory of the user |
1188 |
@code{daniel} on the machine @code{melancholia}. The @file{~<user>} |
@code{daniel} on the machine @code{melancholia}. The @file{~<user>} |
1189 |
construct is expanded to the home directory of that user on the remote |
construct is expanded to the home directory of that user on the remote |
1190 |
machine. |
machine. |
1191 |
|
|
1192 |
@item /[melancholia]/etc/squid.conf |
@item /melancholia:/etc/squid.conf |
1193 |
|
@itemx /[melancholia]/etc/squid.conf |
1194 |
This edits the file @file{/etc/squid.conf} on the machine |
This edits the file @file{/etc/squid.conf} on the machine |
1195 |
@code{melancholia}. |
@code{melancholia}. |
1196 |
|
|
1197 |
@end table |
@end table |
1198 |
|
|
|
|
|
1199 |
Unless you specify a different name to use, @tramp{} will use the current |
Unless you specify a different name to use, @tramp{} will use the current |
1200 |
local user name as the remote user name to log in with. If you need to |
local user name as the remote user name to log in with. If you need to |
1201 |
log in as a different user, you can specify the user name as part of the |
log in as a different user, you can specify the user name as part of the |
1202 |
filename. |
filename. |
1203 |
|
|
1204 |
To log in to the remote machine as a specific user, you use the syntax |
On Emacs, to log in to the remote machine as a specific user, you use |
1205 |
@file{/[<user>@@<machine>]/path/to.file}. That means that connecting to |
the syntax @file{/@var{user}@@@var{machine}:/path/to.file}. On |
1206 |
@code{melancholia} as @code{daniel} and editing @file{.emacs} in your |
XEmacs, use @file{/[@var{user}@@@var{machine}]/path/to.file}. That |
1207 |
home directory you would specify @file{/[daniel@@melancholia].emacs}. |
means that connecting to @code{melancholia} as @code{daniel} and |
1208 |
|
editing @file{.emacs} in your home directory you would specify |
1209 |
|
@file{/daniel@@melancholia:.emacs} on Emacs and |
1210 |
|
@file{/[daniel@@melancholia].emacs} on XEmacs. |
1211 |
|
|
1212 |
|
|
1213 |
It is also possible to specify other file transfer methods |
It is also possible to specify other file transfer methods |
1214 |
(@pxref{Default Method}) as part of the filename. This is done by |
(@pxref{Default Method}) as part of the filename. On Emacs, this is |
1215 |
replacing the initial @file{/[} with @file{/[<method>/}. (Note the |
done by puttig the method before the user and host name, as in |
1216 |
trailing slash!) The user, machine and file specification remain the |
@file{/@var{method}:} (note the trailing colon). On XEmacs, it is |
1217 |
same. |
done by replacing the initial @file{/[} with @file{/[<method>/}. |
1218 |
|
(Note the trailing slash!) The user, machine and file specification |
1219 |
So, to connect to the machine @code{melancholia} as @code{daniel}, using |
remain the same. |
1220 |
the @option{su} method to transfer files, and edit @file{.emacs} in my |
|
1221 |
home directory I would specify the filename |
So, to connect to the machine @code{melancholia} as @code{daniel}, |
1222 |
@file{/[su/daniel@@melancholia].emacs}. |
using the @option{su} method to transfer files, and edit @file{.emacs} |
1223 |
|
in my home directory I would specify the filename |
1224 |
|
@file{/su:daniel@@melancholia:.emacs} on Emacs and |
1225 |
|
@file{/[su/daniel@@melancholia].emacs} on XEmacs. |
1226 |
|
|
1227 |
|
|
1228 |
@node Multi-hop filename syntax |
@node Multi-hop filename syntax |
1230 |
|
|
1231 |
The syntax of multi-hop file names is necessarily slightly different |
The syntax of multi-hop file names is necessarily slightly different |
1232 |
than the syntax of other @tramp{} file names. Here's an example multi-hop |
than the syntax of other @tramp{} file names. Here's an example multi-hop |
1233 |
file name: |
file name, first in Emacs syntax and then in XEmacs syntax: |
1234 |
|
|
1235 |
|
@file{/multi:rsh:out@@gate:telnet:kai@@real.host:/path/to.file} |
1236 |
@file{/[multi/rsh:out@@gate/telnet:kai@@real.host]/path/to.file} |
@file{/[multi/rsh:out@@gate/telnet:kai@@real.host]/path/to.file} |
1237 |
|
|
1238 |
This is quite a mouthful. So let's go through it step by step. The |
This is quite a mouthful. So let's go through it step by step. The |
1239 |
file name consists of three parts, separated by slashes and square |
file name consists of three parts. On Emacs, the parts are separated |
1240 |
brackets. The first part is @file{/[multi}, the method specification. |
by colons, on XEmacs they are separated by slashes and square |
1241 |
The second part is @file{rsh:out@@gate/telnet:kai@@real.host} and |
brackets. The first part is @file{/multi:} (or @file{/[multi}), the |
1242 |
specifies the hops. (Yes, the second part may contain even more |
method specification. The second part is |
1243 |
slashes, so that's why this file name has more than two colons in it.) |
@file{rsh:out@@gate:telnet:kai@@real.host} (or |
1244 |
The final part is @file{/path/to.file} and specifies the file name on |
@file{rsh:out@@gate/telnet:kai@@real.host}) and specifies the hops. |
1245 |
the remote host. |
(Yes, on Emacs the second part may contain even more colons, so that's why |
1246 |
|
this file name has more than two colons in it.) The final part is |
1247 |
|
@file{/path/to.file} and specifies the file name on the remote host. |
1248 |
|
|
1249 |
The first part and the final part should be clear. @ref{Multi-hop |
The first part and the final part should be clear. @ref{Multi-hop |
1250 |
Methods}, for a list of alternatives for the method specification. |
Methods}, for a list of alternatives for the method specification. |
1655 |
forward and wishes to implement and test it, please contact me or the |
forward and wishes to implement and test it, please contact me or the |
1656 |
mailing list. |
mailing list. |
1657 |
|
|
1658 |
|
@item The @tramp{} filename syntax differs between Emacs and XEmacs. |
1659 |
|
|
1660 |
|
The Emacs maintainers wish to use a unified filename syntax for |
1661 |
|
Ange-FTP and @tramp{} so that users don't have to learn a new |
1662 |
|
syntax. It is sufficient to learn some extensions to the old syntax. |
1663 |
|
|
1664 |
|
For the XEmacs maintainers, the problems caused from using a unified |
1665 |
|
filename syntax are greater than the gains. The XEmacs package |
1666 |
|
system uses EFS for downloading new packages. So, obviously, EFS has |
1667 |
|
to be installed from the start. If the filenames were unified, Tramp |
1668 |
|
would have to be installed from the start, too. |
1669 |
|
|
1670 |
@end itemize |
@end itemize |
1671 |
|
|
1672 |
|
|