12 |
@c Makefile, so you should edit the top-level Makefile to change |
@c Makefile, so you should edit the top-level Makefile to change |
13 |
@c the version number. |
@c the version number. |
14 |
@macro trampver{} |
@macro trampver{} |
15 |
2.0.15 |
2.0.16 |
16 |
@end macro |
@end macro |
17 |
|
|
18 |
@c Entries for @command{install-info} to use |
@c Entries for @command{install-info} to use |
27 |
@sc{tramp} |
@sc{tramp} |
28 |
@end macro |
@end macro |
29 |
|
|
30 |
@c Copying permissions, et al |
@c Distinguish between GNU Emacs and XEmacs. Derived from the |
31 |
@copying This file documents @tramp{} version @trampver{}, a remote file |
@c Makefile variable $(EMACS-ID). Valid values are `emacs' and `xemacs'. |
32 |
editing package for Emacs and XEmacs. |
@set emacs |
33 |
|
|
34 |
Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software |
@c Some flags which make the text independent on the (X)Emacs flavor. |
35 |
Foundation, Inc. |
@c GNU Emacs values. |
36 |
|
@ifset emacs |
37 |
@quotation |
@set emacs-name Emacs |
38 |
Permission is granted to copy, distribute and/or modify this document |
@set emacs-dir emacs |
39 |
under the terms of the GNU Free Documentation License, Version 1.1 or |
@set ftp-package-name Ange-FTP |
40 |
any later version published by the Free Software Foundation; with no |
@set tramp-prefix / |
41 |
Invariant Sections, with the Front-Cover texts being ``A GNU |
@set tramp-prefix-single-hop |
42 |
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the |
@set tramp-postfix : |
43 |
license is included in the section entitled ``GNU Free Documentation |
@set tramp-postfix-single-hop : |
44 |
License'' in the Emacs manual. |
@set tramp-postfix-multi-hop : |
45 |
|
@end ifset |
46 |
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
|
47 |
this GNU Manual, like GNU software. Copies published by the Free |
@c XEmacs counterparts. |
48 |
Software Foundation raise funds for GNU development.'' |
@ifset xemacs |
49 |
|
@set emacs-name XEmacs |
50 |
This document is part of a collection distributed under the GNU Free |
@set emacs-dir xemacs |
51 |
Documentation License. If you want to distribute this document |
@set ftp-package-name EFS |
52 |
separately from the collection, you can do so by adding a copy of the |
@set tramp-prefix /[ |
53 |
license to the document, as described in section 6 of the license. |
@set tramp-prefix-single-hop [ |
54 |
@end quotation |
@set tramp-postfix ] |
55 |
@end copying |
@set tramp-postfix-single-hop / |
56 |
|
@set tramp-postfix-multi-hop : |
57 |
|
@end ifset |
58 |
|
|
59 |
|
|
60 |
@tex |
@tex |
75 |
@node Top, Overview, (dir), (dir) |
@node Top, Overview, (dir), (dir) |
76 |
@top @tramp{} version @trampver{} User Manual |
@top @tramp{} version @trampver{} User Manual |
77 |
|
|
78 |
|
This file documents @tramp{} version @trampver{}, a remote file |
79 |
|
editing package for @value{emacs-name}. |
80 |
|
|
81 |
@tramp{} stands for `Transparent Remote (file) Access, Multiple |
@tramp{} stands for `Transparent Remote (file) Access, Multiple |
82 |
Protocol'. This package provides remote file editing, similar to |
Protocol'. This package provides remote file editing, similar to |
83 |
@cite{Ange-FTP} and @cite{EFS}. |
@value{ftp-package-name}. |
84 |
|
|
85 |
The difference is that Ange-FTP uses FTP to transfer files between the |
The difference is that @value{ftp-package-name} uses FTP to transfer |
86 |
local and the remote host, whereas @tramp{} uses a combination of |
files between the local and the remote host, whereas @tramp{} uses a |
87 |
@command{rsh} and @command{rcp} or other work-alike programs, such as |
combination of @command{rsh} and @command{rcp} or other work-alike |
88 |
@command{ssh}/@command{scp}. |
programs, such as @command{ssh}/@command{scp}. |
89 |
|
|
90 |
You can find the latest version of this document on the web at |
You can find the latest version of this document on the web at |
91 |
@uref{http://www.freesoftware.fsf.org/tramp/}. |
@uref{http://www.freesoftware.fsf.org/tramp/}. |
112 |
|
|
113 |
@menu |
@menu |
114 |
* Overview:: What @tramp{} can and cannot do. |
* Overview:: What @tramp{} can and cannot do. |
115 |
|
* Copying:: The license for this documentation. |
116 |
|
|
117 |
For the end user: |
For the end user: |
118 |
* Obtaining @tramp{}:: How to obtain @tramp{}. |
* Obtaining @tramp{}:: How to obtain @tramp{}. |
119 |
* History:: History of @tramp{} |
* History:: History of @tramp{}. |
120 |
* Installation:: Installing @tramp{} with your (X)Emacs. |
* Installation:: Installing @tramp{} with your @value{emacs-name}. |
121 |
* Configuration:: Configuring @tramp{} for use. |
* Configuration:: Configuring @tramp{} for use. |
122 |
* Usage:: An overview of the operation of @tramp{}. |
* Usage:: An overview of the operation of @tramp{}. |
123 |
* Bug Reports:: Reporting Bugs and Problems |
* Bug Reports:: Reporting Bugs and Problems. |
124 |
* Frequently Asked Questions:: Questions and answers from the mailing list. |
* Frequently Asked Questions:: Questions and answers from the mailing list. |
125 |
|
|
126 |
For the developer: |
For the developer: |
127 |
* Version Control:: The inner workings of remote version control. |
* Version Control:: The inner workings of remote version control. |
128 |
* Files directories and paths:: How file names, directories and paths are mangled and managed. |
* Files directories and paths:: How file names, directories and paths are mangled and managed. |
129 |
* Issues:: |
* Issues:: Debatable Issues and What Was Decided. |
130 |
|
|
131 |
@detailmenu |
@detailmenu |
132 |
--- The Detailed Node Listing --- |
--- The Detailed Node Listing --- |
141 |
* Customizing Methods:: Using Non-Standard Methods. |
* Customizing Methods:: Using Non-Standard Methods. |
142 |
* Customizing Completion:: Selecting config files for user/host name completion. |
* Customizing Completion:: Selecting config files for user/host name completion. |
143 |
* Remote Programs:: How @tramp{} finds and uses programs on the remote machine. |
* Remote Programs:: How @tramp{} finds and uses programs on the remote machine. |
144 |
* Remote shell setup:: |
* Remote shell setup:: Remote shell setup hints. |
145 |
|
* Windows setup hints:: Issues with Cygwin ssh. |
146 |
|
|
147 |
Using @tramp |
Using @tramp |
148 |
|
|
157 |
* Remote Commands:: Executing the version control commands on the remote machine. |
* Remote Commands:: Executing the version control commands on the remote machine. |
158 |
* Changed workfiles:: Detecting if the working file has changed. |
* Changed workfiles:: Detecting if the working file has changed. |
159 |
* Checking out files:: Bringing the workfile out of the repository. |
* Checking out files:: Bringing the workfile out of the repository. |
160 |
* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere |
* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere. |
161 |
|
|
162 |
Things related to Version Control that don't fit elsewhere |
Things related to Version Control that don't fit elsewhere |
163 |
|
|
171 |
@end detailmenu |
@end detailmenu |
172 |
@end menu |
@end menu |
173 |
|
|
|
@c Copying permissions, et al |
|
|
@copying |
|
|
This file documents @tramp{}, a remote file editing package for Emacs and |
|
|
XEmacs. |
|
|
|
|
|
Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software |
|
|
Foundation, Inc. |
|
|
|
|
|
@quotation |
|
|
Permission is granted to copy, distribute and/or modify this document |
|
|
under the terms of the GNU Free Documentation License, Version 1.1 or |
|
|
any later version published by the Free Software Foundation; with no |
|
|
Invariant Sections, with the Front-Cover texts being ``A GNU |
|
|
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the |
|
|
license is included in the section entitled ``GNU Free Documentation |
|
|
License'' in the Emacs manual. |
|
|
|
|
|
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
|
|
this GNU Manual, like GNU software. Copies published by the Free |
|
|
Software Foundation raise funds for GNU development.'' |
|
|
|
|
|
This document is part of a collection distributed under the GNU Free |
|
|
Documentation License. If you want to distribute this document |
|
|
separately from the collection, you can do so by adding a copy of the |
|
|
license to the document, as described in section 6 of the license. |
|
|
@end quotation |
|
|
@end copying |
|
|
|
|
174 |
@node Overview |
@node Overview |
175 |
@chapter An overview of @tramp |
@chapter An overview of @tramp |
176 |
@cindex overview |
@cindex overview |
177 |
|
|
178 |
After the installation of @tramp{} into your Emacs, you will be able |
After the installation of @tramp{} into your @value{emacs-name}, you |
179 |
to access files on remote machines as though they were local. Access |
will be able to access files on remote machines as though they were |
180 |
to the remote file system for editing files, version control, and |
local. Access to the remote file system for editing files, version |
181 |
@command{dired} are transparently enabled. |
control, and @command{dired} are transparently enabled. |
182 |
|
|
183 |
Your access to the remote machine can be with the @command{rsh}, |
Your access to the remote machine can be with the @command{rsh}, |
184 |
@command{rlogin}, @command{telnet} programs or with any similar |
@command{rlogin}, @command{telnet} programs or with any similar |
242 |
@tramp{} discovers that it needs a connection to the host. So it |
@tramp{} discovers that it needs a connection to the host. So it |
243 |
invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l |
invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l |
244 |
@var{user}} or a similar tool to connect to the remote host. |
@var{user}} or a similar tool to connect to the remote host. |
245 |
Communication with this process happens through an Emacs buffer, that |
Communication with this process happens through an |
246 |
is, the output from the remote end goes into a buffer. |
@value{emacs-name} buffer, that is, the output from the remote end |
247 |
|
goes into a buffer. |
248 |
|
|
249 |
@item |
@item |
250 |
The remote host may prompt for a login name (for @command{telnet}). The |
The remote host may prompt for a login name (for @command{telnet}). The |
268 |
say), then it issues an error message saying that it couldn't find the |
say), then it issues an error message saying that it couldn't find the |
269 |
remote shell prompt and shows you what the remote host has sent. |
remote shell prompt and shows you what the remote host has sent. |
270 |
|
|
271 |
If @tramp{} sees a `login failed' message, it tells you so, aborts the |
If @tramp{} sees a @samp{login failed} message, it tells you so, |
272 |
login attempt and allows you to try again. |
aborts the login attempt and allows you to try again. |
273 |
|
|
274 |
@item |
@item |
275 |
Suppose that the login was successful and @tramp{} sees the shell prompt |
Suppose that the login was successful and @tramp{} sees the shell prompt |
330 |
behind the scenes when you open a file with @tramp{}. |
behind the scenes when you open a file with @tramp{}. |
331 |
|
|
332 |
|
|
333 |
|
@c Copying permissions, et al |
334 |
|
@node Copying |
335 |
|
@chapter Copying. |
336 |
|
@cindex copying |
337 |
|
|
338 |
|
@copying |
339 |
|
Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software |
340 |
|
Foundation, Inc. |
341 |
|
|
342 |
|
@quotation |
343 |
|
Permission is granted to copy, distribute and/or modify this document |
344 |
|
under the terms of the GNU Free Documentation License, Version 1.1 or |
345 |
|
any later version published by the Free Software Foundation; with no |
346 |
|
Invariant Sections, with the Front-Cover texts being ``A GNU |
347 |
|
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the |
348 |
|
license is included in the section entitled ``GNU Free Documentation |
349 |
|
License'' in the Emacs manual. |
350 |
|
|
351 |
|
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
352 |
|
this GNU Manual, like GNU software. Copies published by the Free |
353 |
|
Software Foundation raise funds for GNU development.'' |
354 |
|
|
355 |
|
This document is part of a collection distributed under the GNU Free |
356 |
|
Documentation License. If you want to distribute this document |
357 |
|
separately from the collection, you can do so by adding a copy of the |
358 |
|
license to the document, as described in section 6 of the license. |
359 |
|
@end quotation |
360 |
|
@end copying |
361 |
|
|
362 |
|
|
363 |
@c For the end user |
@c For the end user |
364 |
@node Obtaining @tramp{} |
@node Obtaining @tramp{} |
365 |
@chapter Obtaining @tramp{}. |
@chapter Obtaining @tramp{}. |
390 |
Or follow the example session below: |
Or follow the example session below: |
391 |
|
|
392 |
@example |
@example |
393 |
] @strong{cd ~/lisp} |
] @strong{cd ~/@value{emacs-dir}} |
394 |
] @strong{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp login} |
] @strong{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp login} |
395 |
|
|
396 |
(Logging in to anoncvs@@subversions.gnu.org) |
(Logging in to anoncvs@@subversions.gnu.org) |
401 |
@end example |
@end example |
402 |
|
|
403 |
@noindent |
@noindent |
404 |
You should now have a directory @file{~/lisp/tramp} containing the latest |
You should now have a directory @file{~/@value{emacs-dir}/tramp} containing the latest |
405 |
version of @tramp{}. You can fetch the latest updates from the repository |
version of @tramp{}. You can fetch the latest updates from the repository |
406 |
by issuing the command: |
by issuing the command: |
407 |
|
|
408 |
@example |
@example |
409 |
] @strong{cd ~/lisp/tramp} |
] @strong{cd ~/@value{emacs-dir}/tramp} |
410 |
] @strong{cvs update -d} |
] @strong{cvs update -d} |
411 |
@end example |
@end example |
412 |
|
|
430 |
|
|
431 |
|
|
432 |
@node Installation |
@node Installation |
433 |
@chapter Installing @tramp{} into Emacs or XEmacs |
@chapter Installing @tramp{} into @value{emacs-name}. |
434 |
@cindex installation |
@cindex installation |
435 |
|
|
436 |
If you use the version that comes with your Emacs or the XEmacs |
If you use the version that comes with your @value{emacs-name}, the |
437 |
package, the following information is not necessary. Installing |
following information is not necessary. Installing @tramp{} into your |
438 |
@tramp{} into your Emacs or XEmacs is a relatively easy process, at |
@value{emacs-name} is a relatively easy process, at least compared |
439 |
least compared to rebuilding your machine from scratch. ;) |
to rebuilding your machine from scratch. ;) |
440 |
|
|
441 |
Seriously though, the installation should be a fairly simple matter. |
Seriously though, the installation should be a fairly simple matter. |
442 |
|
|
444 |
|
|
445 |
@itemize @bullet |
@itemize @bullet |
446 |
@item |
@item |
447 |
Choose a directory, say @file{~/emacs/}. Change into that directory and |
Choose a directory, say @file{~/@value{emacs-dir}/}. Change into that directory and |
448 |
unpack the tarball. This will give you a directory |
unpack the tarball. This will give you a directory |
449 |
@file{~/emacs/tramp/} which contains subdirectories @file{lisp} for the |
@file{~/@value{emacs-dir}/tramp/} which contains subdirectories @file{lisp} for the |
450 |
Lisp code and @file{texi} for the documentation. |
Lisp code and @file{texi} for the documentation. |
451 |
|
|
452 |
@item |
@item |
453 |
Optionally byte-compile all files in the Lisp directory, |
Optionally byte-compile all files in the Lisp directory, |
454 |
@file{~/emacs/tramp/lisp/}, by issuing a command like the following from |
@file{~/@value{emacs-dir}/tramp/lisp/}, by issuing a command like the following from |
455 |
the top level directory @file{~/emacs/tramp/}: |
the top level directory @file{~/@value{emacs-dir}/tramp/}: |
456 |
|
|
457 |
@example |
@example |
458 |
make EMACS=emacs all # for Emacs users |
make EMACS=@value{emacs-dir} all |
|
make EMACS=xemacs all # for XEmacs users |
|
459 |
@end example |
@end example |
460 |
|
|
461 |
@item |
@item |
462 |
NOTE: |
NOTE: If you run into problems running the example @command{make} |
463 |
If you run into problems running the example @command{make} |
command, don't dispare. You can still byte compile the @file{*.el} |
464 |
commands, don't dispare. You can still byte compile the |
files by opening @value{emacs-name} in @command{dired} (@command{C-x |
465 |
@file{*.el} files by opening emacs in @command{dired} |
d}) mode, at @file{~/@value{emacs-dir}/tramp/lisp}. Mark the lisp files with |
466 |
(@command{C-x d}) mode, at @file{~/tramp/lisp}. Mark the lisp |
@kbd{m}, then press @kbd{B} to byte compile your selections. |
467 |
files with @kbd{m}, then press @kbd{B} to byte compile |
|
468 |
your selections. |
Something similar can be done to create the info manual. Just change |
469 |
|
to directory @file{~/@value{emacs-dir}/tramp/texi} and load the |
470 |
Something similar can be done to create the info manual. |
@file{tramp.texi} file in @value{emacs-name}. Then press @kbd{M-x |
471 |
Just cd to @file{~/emacs/tramp/texi} and load the @file{tramp.texi} |
makeinfo-buffer @key{RET}} to generate @file{tramp.info}. |
|
file in emacs. Then press @kbd{M-x makeinfo-buffer @key{RET}} |
|
|
to generate @file{tramp.info}. |
|
472 |
|
|
473 |
@item |
@item |
474 |
Tell Emacs about the new Lisp directory and the @tramp{} package |
Tell @value{emacs-name} about the new Lisp directory and the |
475 |
with the following lines in @file{~/.emacs}: |
@tramp{} package with the following lines in @file{~/.emacs}: |
476 |
|
|
477 |
@lisp |
@lisp |
478 |
(add-to-list 'load-path "~/emacs/tramp/lisp/") |
(add-to-list 'load-path "~/@value{emacs-dir}/tramp/lisp/") |
479 |
(require 'tramp) |
(require 'tramp) |
480 |
@end lisp |
@end lisp |
481 |
|
|
482 |
@item |
@item |
483 |
To be able to read the Info documentation, create a file |
To be able to read the Info documentation, create a file |
484 |
@file{~/emacs/tramp/texi/dir} using for example the |
@file{~/@value{emacs-dir}/tramp/texi/dir} using the |
485 |
@command{install-info} command, and add the directory to the search |
@command{install-info} command, and add the directory to the search |
486 |
path for Info. |
path for Info. |
487 |
|
|
|
@item |
|
488 |
NOTE: |
NOTE: |
489 |
On systems using `gnu' @command{install-info}, the |
On systems using the @cite{gnu} version of @command{install-info}, the |
490 |
@command{install-info} syntax is very direct and simple. One can |
@command{install-info} syntax is very direct and simple. One can |
491 |
cd to @file{~/emacs/tramp/texi} and type: |
change to directory @file{~/@value{emacs-dir}/tramp/texi} and type: |
492 |
@kbd{install-info tramp.info dir} |
|
493 |
|
@example |
494 |
|
install-info tramp.info dir |
495 |
|
@end example |
496 |
|
|
497 |
and a @file{dir} file will be created with the @tramp{} |
and a @file{dir} file will be created with the @tramp{} |
498 |
entry. The info reader will know how to interpret it, but must |
entry. The info reader will know how to interpret it, but must |
499 |
be told where to find it (see below). If you want anything fancier |
be told where to find it (see below). If you want anything fancier |
500 |
you'll need to look through @kbd{man install-info}. |
you'll need to look through @kbd{man install-info}. |
501 |
|
|
502 |
Debian gnu/linux doesn't default to `gnu' @command{install-info} and |
Debian gnu/linux doesn't default to @cite{gnu} @command{install-info} |
503 |
uses its own version. This version does not create a @file{dir} file |
and uses its own version. This version does not create a @file{dir} |
504 |
for you from scratch. You must provide a skeleton dir file it |
file for you from scratch. You must provide a skeleton @file{dir} |
505 |
recognizes. One can be found in a default install at |
file it recognizes. One can be found in a default installation of |
506 |
@file{/usr/info/dir}. Copy the top of this file down to the first |
@value{emacs-name} at @file{/usr/info/dir}. Copy the top of this file |
507 |
occurrence of `* Menu' including that line plus one more blank line, |
down to the first occurrence of @code{* Menu} including that line plus |
508 |
to your working directory @file{texi/dir}, or use the sample provided |
one more blank line, to your working directory |
509 |
in the @file{texi} directroy of this distribution. See |
@file{~/@value{emacs-dir}/tramp/texi}, or use the sample |
510 |
@file{texi/dir_sample} |
@file{~/@value{emacs-dir}/tramp/texi/dir_sample}. |
511 |
|
|
512 |
Once a @file{dir} file is in place, this command will make the entry. |
Once a @file{dir} file is in place, this command will make the entry: |
513 |
install-info --infodir=. tramp.info |
|
514 |
If you want it in a specific category |
@example |
515 |
(see @kbd{man install-info} for further details) |
install-info --infodir=. tramp.info |
516 |
|
@end example |
517 |
|
|
518 |
|
If you want it in a specific category see @kbd{man install-info} for |
519 |
|
further details. |
520 |
|
|
521 |
If the environment variable @env{INFOPATH} is set, add the directory |
If the environment variable @env{INFOPATH} is set, add the directory |
522 |
@file{~/emacs/tramp/texi/} to it. Else, add the directory to |
@file{~/@value{emacs-dir}/tramp/texi/} to it. Else, add the directory to |
523 |
|
@ifset emacs |
524 |
@code{Info-default-directory-list}, as follows: |
@code{Info-default-directory-list}, as follows: |
525 |
|
|
526 |
|
@lisp |
527 |
|
(add-to-list 'Info-default-directory-list "~/@value{emacs-dir}/tramp/texi/") |
528 |
|
@end lisp |
529 |
|
@end ifset |
530 |
|
@ifset xemacs |
531 |
|
@code{Info-directory-list}, as follows: |
532 |
@lisp |
@lisp |
533 |
(add-to-list 'Info-default-directory-list "~/emacs/tramp/texi/") |
(add-to-list 'Info-directory-list "~/@value{emacs-dir}/tramp/texi/") |
534 |
@end lisp |
@end lisp |
535 |
XEmacs 21 users should use @code{Info-directory-list} rather than |
@end ifset |
|
@code{Info-default-directory-list}. |
|
536 |
|
|
537 |
@end itemize |
@end itemize |
538 |
|
|
539 |
|
@ifset xemacs |
540 |
For XEmacs users, the package @file{fsf-compat} must be installed. |
For @value{emacs-name}, the package @file{fsf-compat} must be installed. |
541 |
For details on package installation, see @ref{Packages, , ,xemacs}. |
For details on package installation, see @ref{Packages, , ,xemacs}. |
542 |
@ifhtml |
@ifhtml |
543 |
(If the previous link doesn't work, try the XEmacs documentation at |
(If the previous link doesn't work, try the @value{emacs-name} |
544 |
@uref{http://www.xemacs.org/Documentation/packageGuide.html,the XEmacs |
documentation at |
545 |
site}.) |
@uref{http://www.xemacs.org/Documentation/packageGuide.html,the |
546 |
|
@value{emacs-name} site}.) |
547 |
@end ifhtml |
@end ifhtml |
548 |
|
@end ifset |
549 |
|
|
550 |
@node Configuration |
@node Configuration |
551 |
@chapter Configuring @tramp{} for use |
@chapter Configuring @tramp{} for use |
1165 |
'tramp-multi-connection-function-alist |
'tramp-multi-connection-function-alist |
1166 |
'("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n")) |
'("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n")) |
1167 |
@end lisp |
@end lisp |
1168 |
|
|
1169 |
Now you can use an @code{sshf} hop which connects to port 4400 instead of |
Now you can use an @code{sshf} hop which connects to port 4400 instead of |
1170 |
the standard port. |
the standard port. |
1171 |
|
|
1315 |
Obviously, it can return user names only. |
Obviously, it can return user names only. |
1316 |
@end table |
@end table |
1317 |
|
|
1318 |
|
@ifset emacs |
1319 |
A function which parses @file{~/.netrc"} file syntax doesn't exist in |
A function which parses @file{~/.netrc"} file syntax doesn't exist in |
1320 |
@tramp{}, because this task is delegated to @cite{Ange-FTP}. Its |
@tramp{}, because this task is delegated to |
1321 |
customization should be used instead. |
@value{ftp-package-name}. Its customization should be used instead. |
1322 |
|
@end ifset |
1323 |
|
|
1324 |
If you want to keep your own data in a file, with your own structure, |
If you want to keep your own data in a file, with your own structure, |
1325 |
you might provide such a function as well. This function must meet |
you might provide such a function as well. This function must meet |
1374 |
as: |
as: |
1375 |
|
|
1376 |
@lisp |
@lisp |
1377 |
@i{;; We load Tramp to define the variable.} |
@i{;; We load @tramp{} to define the variable.} |
1378 |
(require 'tramp) |
(require 'tramp) |
1379 |
@i{;; We have @command{perl} in "/usr/local/perl/bin"} |
@i{;; We have @command{perl} in "/usr/local/perl/bin"} |
1380 |
(add-to-list 'tramp-remote-path "/usr/local/perl/bin") |
(add-to-list 'tramp-remote-path "/usr/local/perl/bin") |
1381 |
@end lisp |
@end lisp |
1382 |
|
|
1383 |
|
|
1384 |
@node Remote shell setup |
@node Remote shell setup |
1385 |
@comment node-name, next, previous, up |
@comment node-name, next, previous, up |
1386 |
@section Remote shell setup hints |
@section Remote shell setup hints |
1462 |
|
|
1463 |
@vindex tramp-terminal-type |
@vindex tramp-terminal-type |
1464 |
The variable @code{tramp-terminal-type} can be used to change this value |
The variable @code{tramp-terminal-type} can be used to change this value |
1465 |
@code{dumb}. |
to @code{dumb}. |
1466 |
|
|
1467 |
The other approach is to teach @tramp{} about these questions. See |
The other approach is to teach @tramp{} about these questions. See |
1468 |
the variables @code{tramp-actions-before-shell} and |
the variables @code{tramp-actions-before-shell} and |
1495 |
|
|
1496 |
Files are specified to @tramp{} using a formalized syntax specifying the |
Files are specified to @tramp{} using a formalized syntax specifying the |
1497 |
details of the system to connect to. This is similar to the syntax used |
details of the system to connect to. This is similar to the syntax used |
1498 |
by the @command{EFS} and @command{Ange-FTP} packages. |
by the @value{ftp-package-name} package. |
1499 |
|
|
1500 |
@cindex type-ahead |
@cindex type-ahead |
1501 |
Something that might happen which surprises you is that Emacs |
Something that might happen which surprises you is that Emacs |
1521 |
@cindex filename syntax |
@cindex filename syntax |
1522 |
@cindex filename examples |
@cindex filename examples |
1523 |
|
|
1524 |
On Emacs, the Ange-FTP and Tramp filenames use a unified syntax. On |
To access the file @var{path} on the remote machine @var{machine} you |
1525 |
XEmacs, EFS and Tramp use different formats for the filenames. |
would specify the filename |
1526 |
Therefore, the following will describe the Emacs and XEmacs cases |
@file{@value{tramp-prefix}@var{machine}@value{tramp-postfix}@var{path}}. |
1527 |
separately. |
This will connect to @var{machine} and transfer the file using the |
1528 |
|
default method. @xref{Default Method}. |
1529 |
On Emacs, to access the file @var{path} on the remote machine |
|
1530 |
@var{machine} you would specify the filename |
Some examples of @tramp{} filenames are shown below. |
|
@file{/@var{machine}:@var{path}}. This will connect to @var{machine} |
|
|
and transfer the file using the default method. @xref{Default |
|
|
Method}. On XEmacs, use @file{/[@var{machine}]@var{path}}. (The |
|
|
square brackets are part of the file name.) |
|
|
|
|
|
Some examples of @tramp{} filenames are shown below. In each case, |
|
|
the Emacs-style filename is shown first, then the XEmacs-style |
|
|
filename. |
|
1531 |
|
|
1532 |
@table @file |
@table @file |
1533 |
@item /melancholia:.emacs |
@item @value{tramp-prefix}melancholia@value{tramp-postfix}.emacs |
|
@itemx /[melancholia].emacs |
|
1534 |
Edit the file @file{.emacs} in your home directory on the machine |
Edit the file @file{.emacs} in your home directory on the machine |
1535 |
@code{melancholia}. |
@code{melancholia}. |
1536 |
|
|
1537 |
@item /melancholia.danann.net:.emacs |
@item @value{tramp-prefix}melancholia.danann.net@value{tramp-postfix}.emacs |
|
@itemx /[melancholia.danann.net].emacs |
|
1538 |
This edits the same file, using the fully qualified domain name of |
This edits the same file, using the fully qualified domain name of |
1539 |
the machine. |
the machine. |
1540 |
|
|
1541 |
@item /melancholia:~/.emacs |
@item @value{tramp-prefix}melancholia@value{tramp-postfix}~/.emacs |
|
@itemx /[melancholia]~/.emacs |
|
1542 |
This also edits the same file --- the @file{~} is expanded to your |
This also edits the same file --- the @file{~} is expanded to your |
1543 |
home directory on the remote machine, just like it is locally. |
home directory on the remote machine, just like it is locally. |
1544 |
|
|
1545 |
@item /melancholia:~daniel/.emacs |
@item @value{tramp-prefix}melancholia@value{tramp-postfix}~daniel/.emacs |
|
@itemx /[melancholia]~daniel/.emacs |
|
1546 |
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 |
1547 |
@code{daniel} on the machine @code{melancholia}. The @file{~<user>} |
@code{daniel} on the machine @code{melancholia}. The @file{~<user>} |
1548 |
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 |
1549 |
machine. |
machine. |
1550 |
|
|
1551 |
@item /melancholia:/etc/squid.conf |
@item @value{tramp-prefix}melancholia@value{tramp-postfix}/etc/squid.conf |
|
@itemx /[melancholia]/etc/squid.conf |
|
1552 |
This edits the file @file{/etc/squid.conf} on the machine |
This edits the file @file{/etc/squid.conf} on the machine |
1553 |
@code{melancholia}. |
@code{melancholia}. |
1554 |
|
|
1555 |
@end table |
@end table |
1556 |
|
|
1557 |
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 |
1558 |
local user name as the remote user name to log in with. If you need to |
current local user name as the remote user name to log in with. If you |
1559 |
log in as a different user, you can specify the user name as part of the |
need to log in as a different user, you can specify the user name as |
1560 |
filename. |
part of the filename. |
1561 |
|
|
1562 |
On Emacs, to log in to the remote machine as a specific user, you use |
To log in to the remote machine as a specific user, you use the syntax |
1563 |
the syntax @file{/@var{user}@@@var{machine}:/path/to.file}. On |
@file{@value{tramp-prefix}@var{user}@@@var{machine}@value{tramp-postfix}/@var{path/to.file}}. |
1564 |
XEmacs, use @file{/[@var{user}@@@var{machine}]/path/to.file}. That |
That means that connecting to @code{melancholia} as @code{daniel} and |
|
means that connecting to @code{melancholia} as @code{daniel} and |
|
1565 |
editing @file{.emacs} in your home directory you would specify |
editing @file{.emacs} in your home directory you would specify |
1566 |
@file{/daniel@@melancholia:.emacs} on Emacs and |
@file{@value{tramp-prefix}daniel@@melancholia@value{tramp-postfix}.emacs}. |
|
@file{/[daniel@@melancholia].emacs} on XEmacs. |
|
|
|
|
1567 |
|
|
1568 |
It is also possible to specify other file transfer methods |
It is also possible to specify other file transfer methods |
1569 |
(@pxref{Default Method}) as part of the filename. On Emacs, this is |
(@pxref{Default Method}) as part of the filename. |
1570 |
done by puttig the method before the user and host name, as in |
@ifset emacs |
1571 |
@file{/@var{method}:} (note the trailing colon). On XEmacs, it is |
This is done by putting the method before the user and host name, as |
1572 |
done by replacing the initial @file{/[} with @file{/[<method>/}. |
in |
1573 |
(Note the trailing slash!) The user, machine and file specification |
@file{@value{tramp-prefix}@var{method}@value{tramp-postfix-single-hop}} |
1574 |
remain the same. |
(note the trailing colon). |
1575 |
|
@end ifset |
1576 |
|
@ifset xemacs |
1577 |
|
This is done by replacing the initial |
1578 |
|
@file{@value{tramp-prefix}} with |
1579 |
|
@file{@value{tramp-prefix}<method>@value{tramp-postfix-single-hop}}. |
1580 |
|
(Note the trailing slash!). |
1581 |
|
@end ifset |
1582 |
|
The user, machine and file specification remain the same. |
1583 |
|
|
1584 |
So, to connect to the machine @code{melancholia} as @code{daniel}, |
So, to connect to the machine @code{melancholia} as @code{daniel}, |
1585 |
using the @option{su} method to transfer files, and edit @file{.emacs} |
using the @option{su} method to transfer files, and edit @file{.emacs} |
1586 |
in my home directory I would specify the filename |
in my home directory I would specify the filename |
1587 |
@file{/su:daniel@@melancholia:.emacs} on Emacs and |
@file{@value{tramp-prefix}su@value{tramp-postfix-single-hop}daniel@@melancholia@value{tramp-postfix}.emacs}. |
|
@file{/[su/daniel@@melancholia].emacs} on XEmacs. |
|
1588 |
|
|
1589 |
|
|
1590 |
@node Multi-hop filename syntax |
@node Multi-hop filename syntax |
1593 |
@cindex multi-hop filename syntax |
@cindex multi-hop filename syntax |
1594 |
|
|
1595 |
The syntax of multi-hop file names is necessarily slightly different |
The syntax of multi-hop file names is necessarily slightly different |
1596 |
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 |
1597 |
file name, first in Emacs syntax and then in XEmacs syntax: |
multi-hop file name, first in Emacs syntax and then in XEmacs syntax: |
1598 |
|
|
1599 |
@example |
@example |
1600 |
/multi:rsh:out@@gate:telnet:kai@@real.host:/path/to.file |
@value{tramp-prefix}multi@value{tramp-postfix-single-hop}rsh@value{tramp-postfix-multi-hop}out@@gate@value{tramp-postfix-single-hop}telnet@value{tramp-postfix-multi-hop}kai@@real.host@value{tramp-postfix}/path/to.file |
|
/[multi/rsh:out@@gate/telnet:kai@@real.host]/path/to.file |
|
1601 |
@end example |
@end example |
1602 |
|
|
1603 |
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 |
1604 |
file name consists of three parts. On Emacs, the parts are separated |
file name consists of three parts. |
1605 |
by colons, on XEmacs they are separated by slashes and square |
@ifset emacs |
1606 |
brackets. The first part is @file{/multi:} (or @file{/[multi}), the |
The parts are separated by colons |
1607 |
method specification. The second part is |
@end ifset |
1608 |
@file{rsh:out@@gate:telnet:kai@@real.host} (or |
@ifset xemacs |
1609 |
@file{rsh:out@@gate/telnet:kai@@real.host}) and specifies the hops. |
The parts are separated by slashes and square brackets. |
1610 |
(Yes, on Emacs the second part may contain even more colons, so that's why |
@end ifset |
1611 |
this file name has more than two colons in it.) The final part is |
The first part is @file{@value{tramp-prefix}multi}, the method |
1612 |
@file{/path/to.file} and specifies the file name on the remote host. |
specification. The second part is |
1613 |
|
@file{rsh@value{tramp-postfix-multi-hop}out@@gate@value{tramp-postfix-single-hop}telnet@value{tramp-postfix-multi-hop}kai@@real.host} |
1614 |
|
and specifies the hops. The final part is @file{/path/to.file} and |
1615 |
|
specifies the file name on the remote host. |
1616 |
|
|
1617 |
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 |
1618 |
Methods}, for a list of alternatives for the method specification. |
Methods}, for a list of alternatives for the method specification. |
1619 |
|
|
1620 |
The second part can be subdivided again into components, so-called hops. |
The second part can be subdivided again into components, so-called |
1621 |
In the above file name, there are two hops, @file{rsh:out@@gate} and |
hops. In the above file name, there are two hops, |
1622 |
@file{telnet:kai@@real.host}. |
@file{rsh@value{tramp-postfix-multi-hop}out@@gate} and |
1623 |
|
@file{telnet@value{tramp-postfix-multi-hop}kai@@real.host}. |
1624 |
|
|
1625 |
Each hop can @emph{again} be subdivided into (three) components, the |
Each hop can @emph{again} be subdivided into (three) components, the |
1626 |
@dfn{hop method}, the @dfn{user name} and the @dfn{host name}. The |
@dfn{hop method}, the @dfn{user name} and the @dfn{host name}. The |
1627 |
meaning of the second and third component should be clear, and the hop |
meaning of the second and third component should be clear, and the hop |
1628 |
method says what program to use to perform that hop. |
method says what program to use to perform that hop. |
1629 |
|
|
1630 |
The first hop, @file{rsh:out@@gate}, says to use @command{rsh} to log in |
The first hop, @file{rsh@value{tramp-postfix-multi-hop}out@@gate}, |
1631 |
as user @code{out} to the host @code{gate}. Starting at that host, the |
says to use @command{rsh} to log in as user @code{out} to the host |
1632 |
second hop, @file{telnet:kai@@real.host}, says to use @command{telnet} |
@code{gate}. Starting at that host, the second hop, |
1633 |
to log in as user @code{kai} to host @code{real.host}. |
@file{telnet@value{tramp-postfix-multi-hop}kai@@real.host}, says to |
1634 |
|
use @command{telnet} to log in as user @code{kai} to host |
1635 |
@xref{Multi-hop Methods}, for a list of possible hop method values. The |
@code{real.host}. |
1636 |
variable @var{tramp-multi-connection-function-alist} contains the list of |
|
1637 |
possible hop methods and information on how to execute them, should you |
@xref{Multi-hop Methods}, for a list of possible hop method values. |
1638 |
want to add your own. |
The variable @code{tramp-multi-connection-function-alist} contains the |
1639 |
|
list of possible hop methods and information on how to execute them, |
1640 |
|
should you want to add your own. |
1641 |
|
|
1642 |
|
|
1643 |
@node Filename completion |
@node Filename completion |
1648 |
user names and machine names (except multi hop methods) as well as for |
user names and machine names (except multi hop methods) as well as for |
1649 |
files on remote machines. |
files on remote machines. |
1650 |
|
|
1651 |
If you, for example, type @kbd{C-x C-f /t @key{TAB}}, @tramp{} might |
If you, for example, type @kbd{C-x C-f @value{tramp-prefix}t |
1652 |
give you as result the choice for |
@key{TAB}}, @tramp{} might give you as result the choice for |
1653 |
|
|
1654 |
@example |
@example |
1655 |
telnet: tmp/ |
@ifset emacs |
1656 |
toto: |
@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop} tmp/ |
1657 |
|
@value{tramp-prefix-single-hop}toto@value{tramp-postfix} |
1658 |
|
@end ifset |
1659 |
|
@ifset xemacs |
1660 |
|
@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop} @value{tramp-prefix-single-hop}toto@value{tramp-postfix} |
1661 |
|
@end ifset |
1662 |
@end example |
@end example |
1663 |
|
|
1664 |
@samp{telnet:} is a possible completion for the respective method, |
@samp{@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}} |
1665 |
|
is a possible completion for the respective method, |
1666 |
|
@ifset emacs |
1667 |
@samp{tmp/} stands for the directory @file{/tmp} on your local |
@samp{tmp/} stands for the directory @file{/tmp} on your local |
1668 |
machine, and @samp{toto:} might be a host @tramp has detected in your |
machine, |
1669 |
@file{~/.ssh/known_hosts} file (given you're using default method |
@end ifset |
1670 |
@option{ssh}). |
and @samp{@value{tramp-prefix-single-hop}toto@value{tramp-postfix}} |
1671 |
|
might be a host @tramp has detected in your @file{~/.ssh/known_hosts} |
1672 |
|
file (given you're using default method @option{ssh}). |
1673 |
|
|
1674 |
If you go on to type @kbd{e @key{TAB}}, the minibuffer is completed to |
If you go on to type @kbd{e @key{TAB}}, the minibuffer is completed to |
1675 |
@samp{/telnet:}. Next @kbd{@key{TAB}} brings you all machine names |
@samp{@value{tramp-prefix}telnet@value{tramp-postfix-single-hop}}. |
1676 |
@tramp{} detects in your @file{/etc/hosts} file, let's say |
Next @kbd{@key{TAB}} brings you all machine names @tramp{} detects in |
1677 |
|
your @file{/etc/hosts} file, let's say |
1678 |
|
|
1679 |
@example |
@example |
1680 |
telnet:127.0.0.1: telnet:192.168.0.1: |
@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}127.0.0.1@value{tramp-postfix} @value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}192.168.0.1@value{tramp-postfix} |
1681 |
telnet:localhost: telnet:melancholia.danann.net: |
@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}localhost@value{tramp-postfix} @value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}melancholia.danann.net@value{tramp-postfix} |
1682 |
telnet:melancholia: |
@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}melancholia@value{tramp-postfix} |
1683 |
@end example |
@end example |
1684 |
|
|
1685 |
Now you can choose the desired machine, and you can continue to |
Now you can choose the desired machine, and you can continue to |
1792 |
@tramp{} installed. |
@tramp{} installed. |
1793 |
|
|
1794 |
If you do, please try and find out exactly the conditions required for |
If you do, please try and find out exactly the conditions required for |
1795 |
the @code{EFS} handlers to fire. If you can, putting a breakpoint on |
the EFS handlers to fire. If you can, putting a breakpoint on |
1796 |
@code{efs-ftp-path} and sending in the stack trace along with your bug |
@code{efs-ftp-path} and sending in the stack trace along with your bug |
1797 |
report would make it easier for the developers to work out what is going |
report would make it easier for the developers to work out what is |
1798 |
wrong. |
going wrong. |
1799 |
|
|
1800 |
|
|
1801 |
@item |
@item |
1894 |
@node Version Control |
@node Version Control |
1895 |
@chapter The inner workings of remote version control |
@chapter The inner workings of remote version control |
1896 |
|
|
1897 |
Unlike EFS and Ange-FTP, @tramp{} has full shell access to the remote |
Unlike @value{ftp-package-name}, @tramp{} has full shell access to the |
1898 |
machine. This makes it possible to provide version control for files |
remote machine. This makes it possible to provide version control for |
1899 |
accessed under @tramp{}. |
files accessed under @tramp{}. |
1900 |
|
|
1901 |
The actual version control binaries must be installed on the remote |
The actual version control binaries must be installed on the remote |
1902 |
machine, accessible in the directories specified in |
machine, accessible in the directories specified in |
1911 |
* Remote Commands:: Executing the version control commands on the remote machine. |
* Remote Commands:: Executing the version control commands on the remote machine. |
1912 |
* Changed workfiles:: Detecting if the working file has changed. |
* Changed workfiles:: Detecting if the working file has changed. |
1913 |
* Checking out files:: Bringing the workfile out of the repository. |
* Checking out files:: Bringing the workfile out of the repository. |
1914 |
* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere |
* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere. |
1915 |
@end menu |
@end menu |
1916 |
|
|
1917 |
|
|
2120 |
@c * M. Albinus |
@c * M. Albinus |
2121 |
@c ** Use `filename' resp. `file name' consistently. |
@c ** Use `filename' resp. `file name' consistently. |
2122 |
@c ** Use `host' resp. `machine' consistently. |
@c ** Use `host' resp. `machine' consistently. |
|
@c ** Consequent `.' at the end of menues. |
|
2123 |
@c ** Consistent small or capitalized words especially in menues. |
@c ** Consistent small or capitalized words especially in menues. |