diff options
Diffstat (limited to 'man/tramp.texi')
-rw-r--r-- | man/tramp.texi | 395 |
1 files changed, 289 insertions, 106 deletions
diff --git a/man/tramp.texi b/man/tramp.texi index 07cffe26137..7e21b9c691f 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -30,10 +30,10 @@ @end macro @copying -Copyright @copyright{} 1999, 2000, 2001, 2002, 2003 Free Software +Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -@quotation +@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 @@ -54,10 +54,10 @@ license to the document, as described in section 6 of the license. @end copying @c Entries for @command{install-info} to use -@dircategory Emacs +@dircategory @value{emacs-name} @direntry * TRAMP: (tramp). Transparent Remote Access, Multiple Protocol - Emacs remote file access via rsh and rcp. + @value{emacs-name} remote file access via rsh and rcp. @end direntry @tex @@ -102,22 +102,33 @@ You can find the latest version of this document on the web at @end ifset @ifhtml -This manual is also available as a @uref{tramp_ja.html, Japanese -translation}. +@ifset jamanual +This manual is also available as a @uref{@value{japanese-manual}, +Japanese translation}. +@end ifset The latest release of @tramp{} is available for -@uref{http://savannah.gnu.org/download/tramp/, +@uref{http://savannah.nongnu.org/download/tramp/, download}, or you may see @ref{Obtaining @tramp{}} for more details, including the CVS server details. -@tramp{} also has a @uref{https://savannah.gnu.org/projects/tramp/, +@tramp{} also has a @uref{http://savannah.nongnu.org/projects/tramp/, Savannah Project Page}. @end ifhtml There is a mailing list for @tramp{}, available at @email{tramp-devel@@mail.freesoftware.fsf.org}, and archived at -@uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/} as -well as the usual Savannah archives. +@uref{http://savannah.nongnu.org/mail/?group=tramp, Savannah Mail +Archive}. +@ifhtml +Older archives are located at +@uref{http://sourceforge.net/mailarchive/forum.php?forum=tramp-devel, +SourceForge Mail Archive} and +@uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/, +The Mail Archive}. +@c in HTML output, there's no new paragraph. +@*@* +@end ifhtml @insertcopying @@ -137,7 +148,7 @@ For the end user: * Usage:: An overview of the operation of @tramp{}. * Bug Reports:: Reporting Bugs and Problems. * Frequently Asked Questions:: Questions and answers from the mailing list. -* Concept Index:: An item for each concept +* Concept Index:: An item for each concept. For the developer: @@ -153,6 +164,7 @@ Installing @tramp{} with your @value{emacs-name} * Installation parameters:: Parameters in order to control installation. * Load paths:: How to plug-in @tramp{} into your environment. +* Japanese manual:: Japanese manual. @end ifset @@ -165,12 +177,13 @@ Configuring @tramp{} for use * Default Method:: Selecting a default method. * Customizing Methods:: Using Non-Standard Methods. * Customizing Completion:: Selecting config files for user/host name completion. +* Password caching:: Reusing passwords for several connections. * Remote Programs:: How @tramp{} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. * Windows setup hints:: Issues with Cygwin ssh. * Auto-save and Backup:: Auto-save and Backup. -Using @tramp +Using @tramp{} * Filename Syntax:: @tramp{} filename conventions. * Multi-hop filename syntax:: Multi-hop filename conventions. @@ -198,7 +211,7 @@ How file names, directories and localnames are mangled and managed @end menu @node Overview -@chapter An overview of @tramp +@chapter An overview of @tramp{} @cindex overview After the installation of @tramp{} into your @value{emacs-name}, you @@ -208,8 +221,8 @@ control, and @command{dired} are transparently enabled. Your access to the remote machine can be with the @command{rsh}, @command{rlogin}, @command{telnet} programs or with any similar -connection method. This connection must pass ASCII successfully to be -usable but need not be 8-bit clean. +connection method. This connection must pass @acronym{ASCII} +successfully to be usable but need not be 8-bit clean. The package provides support for @command{ssh} connections out of the box, one of the more common uses of the package. This allows @@ -359,7 +372,7 @@ behind the scenes when you open a file with @tramp{}. @c For the end user @node Obtaining @tramp{} @chapter Obtaining @tramp{}. -@cindex obtaining Tramp +@cindex obtaining @tramp{} @tramp{} is freely available on the Internet and the latest release may be downloaded from @@ -380,20 +393,15 @@ following URL and then clicking on the CVS link in the navigation bar at the top. @noindent -@uref{http://savannah.gnu.org/projects/tramp/} +@uref{http://savannah.nongnu.org/projects/tramp/} @noindent Or follow the example session below: @example ] @strong{cd ~/@value{emacs-dir}} -] @strong{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp login} - -(Logging in to anoncvs@@subversions.gnu.org) -CVS password: @strong{(just hit RET here)} -@dots{} - -] @strong{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp co tramp} +] @strong{export CVS_RSH="ssh"} +] @strong{cvs -z3 -d:ext:anoncvs@@savannah.nongnu.org:/cvsroot/tramp co tramp} @end example @noindent @@ -403,6 +411,7 @@ updates from the repository by issuing the command: @example ] @strong{cd ~/@value{emacs-dir}/tramp} +] @strong{export CVS_RSH="ssh"} ] @strong{cvs update -d} @end example @@ -445,11 +454,12 @@ filenames in July 2002. @cindex configuration @cindex default configuration -@tramp{} is (normally) fully functional when it is initially -installed. It is initially configured to use the @command{ssh} program -to connect to the remote host and to use base-64 encoding (on the -remote host, via @command{mimencode}, and on the local host via the -built-in support for base-64 encoding in Emacs). +@tramp{} is (normally) fully functional when it is initially installed. +It is initially configured to use the @command{ssh} program to connect +to the remote host and to use base64 or uu encoding to transfer the +files through that shell connection. So in the easiest case, you just +type @kbd{C-x C-f} and then enter the filename +@file{@value{tramp-prefix}@var{user}@@@var{machine}@value{tramp-postfix}@var{/path/to.file}}. On some hosts, there are problems with opening a connection. These are related to the behavior of the remote shell. See @xref{Remote shell @@ -457,10 +467,13 @@ setup}, for details on this. If you do not wish to use these commands to connect to the remote host, you should change the default connection and transfer method -that @tramp uses. There are several different methods that @tramp{} +that @tramp{} uses. There are several different methods that @tramp{} can use to connect to remote machines and transfer files (@pxref{Connection types}). +If you don't know which method is right for you, see @xref{Default +Method}. + @menu * Connection types:: Types of connections made to remote machines. @@ -468,8 +481,12 @@ can use to connect to remote machines and transfer files * External transfer methods:: External transfer methods. * Multi-hop Methods:: Connecting to a remote host using multiple hops. * Default Method:: Selecting a default method. + Here we also try to help those who + don't have the foggiest which method + is right for them. * Customizing Methods:: Using Non-Standard Methods. * Customizing Completion:: Selecting config files for user/host name completion. +* Password caching:: Reusing passwords for several connections. * Remote Programs:: How @tramp{} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. * Windows setup hints:: Issues with Cygwin ssh. @@ -486,7 +503,7 @@ advantages and limitations. Both types of connection make use of a remote shell access program such as @command{rsh}, @command{ssh} or @command{telnet} to connect to the remote machine. -This connection is used to perform many of the operations that @tramp +This connection is used to perform many of the operations that @tramp{} requires to make the remote file system transparently accessible from the local machine. It is only when visiting files that the methods differ. @@ -544,9 +561,9 @@ allow you to transfer files between @emph{user identities} rather than hosts, see below.) These methods depend on the existence of a suitable encoding and -decoding command on remote machine. Locally, @tramp{} may be able to use -features of Emacs to decode and encode the files or it may require -access to external commands to perform that task. +decoding command on remote machine. Locally, @tramp{} may be able to +use features of @value{emacs-name} to decode and encode the files or +it may require access to external commands to perform that task. @cindex uuencode @cindex mimencode @@ -635,7 +652,7 @@ easy to implement, so I haven't got around to it, yet. @cindex sshx method @cindex Cygwin (with sshx method) -As you expect, this is similar to @option{ssh}, only a little +As you would expect, this is similar to @option{ssh}, only a little different. Whereas @option{ssh} opens a normal interactive shell on the remote host, this option uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} to open a connection. This is useful for users @@ -652,11 +669,11 @@ question (yet), therefore you will need to make sure that you can log in without such questions. This is also useful for Windows users where @command{ssh}, when -invoked from an Emacs buffer, tells them that it is not allocating a -pseudo tty. When this happens, the login shell is wont to not print -any shell prompt, which confuses @tramp{} mightily. For reasons -unknown, some Windows ports for @command{ssh} (maybe the Cygwin one) -require the doubled @samp{-t} option. +invoked from an @value{emacs-name} buffer, tells them that it is not +allocating a pseudo tty. When this happens, the login shell is wont +to not print any shell prompt, which confuses @tramp{} mightily. For +reasons unknown, some Windows ports for @command{ssh} (maybe the +Cygwin one) require the doubled @samp{-t} option. This supports the @samp{-p} kludge. @@ -760,7 +777,7 @@ call @samp{ssh -1} and @samp{ssh -2}, respectively. This way, you can explicitly select whether you want to use the SSH protocol version 1 or 2 to connect to the remote host. (You can also specify in @file{~/.ssh/config}, the SSH configuration file, which protocol -should be used, and use the regular @option{ssh} method.) +should be used, and use the regular @option{scp} method.) Two other variants, @option{scp1_old} and @option{scp2_old}, use the @command{ssh1} and @command{ssh2} commands explicitly. If you don't @@ -800,7 +817,7 @@ This method supports the @samp{-p} hack. @cindex ssh (with scpx method) @cindex Cygwin (with scpx method) -As you expect, this is similar to @option{scp}, only a little +As you would expect, this is similar to @option{scp}, only a little different. Whereas @option{scp} opens a normal interactive shell on the remote host, this option uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} to open a connection. This is useful for users @@ -810,10 +827,10 @@ just gives @tramp{} a more-or-less `standard' login shell to work with. This is also useful for Windows users where @command{ssh}, when -invoked from an Emacs buffer, tells them that it is not allocating a -pseudo tty. When this happens, the login shell is wont to not print -any shell prompt, which confuses @tramp{} mightily. Maybe this -applies to the Cygwin port of SSH. +invoked from an @value{emacs-name} buffer, tells them that it is not +allocating a pseudo tty. When this happens, the login shell is wont +to not print any shell prompt, which confuses @tramp{} mightily. +Maybe this applies to the Cygwin port of SSH. This method supports the @samp{-p} hack. @@ -854,19 +871,21 @@ This method uses the command @samp{fsh @var{host} -l @var{user} @cindex method fsh @cindex fsh method + There is no inline method using @command{fsh} as the multiplexing provided by the program is not very useful in our context. @tramp{} opens just one connection to the remote host and then keeps it open, anyway. -@ifset emacs @item @option{ftp} @cindex method ftp @cindex ftp method This is not a native @tramp{} method. Instead of, it forwards all requests to @value{ftp-package-name}. +@ifset xemacs +This works only for unified filenames, see @ref{Issues}. @end ifset @@ -889,7 +908,7 @@ directory @code{/}), all available shares are listed. Since authorization is done on share level, you will be prompted always for a password if you access another share on the same host. -Due to security reasons, the password is not cached. +This can be suppressed by @ref{Password caching}. MS Windows uses for authorization both a user name and a domain name. Because of this, the @tramp{} syntax has been extended: you can @@ -907,10 +926,11 @@ methods, where in such a case the local user name is taken. The @option{smb} method supports the @samp{-p} hack. -@strong{Please note:} If Emacs runs locally under MS Windows, this -method isn't available. Instead of, you can use UNC file names like -@file{//melancholia/daniel$$/.emacs}. The only disadvantage is that -there's no possibility to specify another user name. +@strong{Please note:} If @value{emacs-name} runs locally under MS +Windows, this method isn't available. Instead of, you can use UNC +file names like @file{//melancholia/daniel$$/.emacs}. The only +disadvantage is that there's no possibility to specify another user +name. @end table @@ -1013,7 +1033,7 @@ the standard port. @vindex tramp-default-method When you select an appropriate transfer method for your typical usage -you should set the variable @var{tramp-default-method} to reflect that +you should set the variable @code{tramp-default-method} to reflect that choice. This variable controls which method will be used when a method is not specified in the @tramp{} file name. For example: @@ -1023,7 +1043,7 @@ is not specified in the @tramp{} file name. For example: @vindex tramp-default-method-alist You can also specify different methods for certain user/host -combinations, via the variable @var{tramp-default-method-alist}. For +combinations, via the variable @code{tramp-default-method-alist}. For example, the following two lines specify to use the @option{ssh} method for all user names matching @samp{john} and the @option{rsync} method for all host names matching @samp{lily}. The third line @@ -1039,7 +1059,7 @@ the machine @samp{localhost}. @noindent See the documentation for the variable -@var{tramp-default-method-alist} for more details. +@code{tramp-default-method-alist} for more details. External transfer methods are normally preferable to inline transfer methods, giving better performance. They may not be useful if you use @@ -1064,6 +1084,48 @@ methods to connect. These provide a much higher level of security, making it a non-trivial exercise for someone to obtain your password or read the content of the files you are editing. + +@subsection Which method is the right one for me? +@cindex choosing the right method + +Given all of the above, you are probably thinking that this is all fine +and good, but it's not helping you to choose a method! Right you are. +As a developer, we don't want to boss our users around but give them +maximum freedom instead. However, the reality is that some users would +like to have some guidance, so here I'll try to give you this guidance +without bossing you around. You tell me whether it works @dots{} + +My suggestion is to use an inline method. For large files, out-of-band +methods might be more efficient, but I guess that most people will want +to edit mostly small files. + +I guess that these days, most people can access a remote machine by +using @code{ssh}. So I suggest that you use the @code{ssh} method. +So, type @kbd{C-x C-f /ssh:root@@otherhost:/etc/motd @key{RET}} to +edit the @file{/etc/motd} file on the other host. + +If you can't use @code{ssh} to log in to the remote host, then select a +method that uses a program that works. For instance, Windows users +might like the @code{plink} method which uses the PuTTY implementation +of @code{ssh}. Or you use Kerberos and thus like @code{krlogin}. + +For the special case of editing files on the local host as another +user, see the @code{su} or @code{sudo} method. + +People who edit large files may want to consider @code{scp} instead of +@code{ssh}, or @code{pscp} instead of @code{plink}. These out-of-band +methods are faster than inline methods for large files. Note, however, +that out-of-band methods suffer from some limitations. Please try +first whether you really get a noticeable speed advantage from using an +out-of-band method! Maybe even for large files, inline methods are +fast enough. + +The reason why I'm suggesting to use inline methods is that they work +even if the remote end is asking you for a password. Out-of-band +methods don't work in this situation. Also, multi-hop methods are +inherently inline. + + @node Customizing Methods @section Using Non-Standard Methods @cindex customizing methods @@ -1109,7 +1171,7 @@ Example: @defun tramp-set-completion-function method function-list This function sets @var{function-list} as list of completion functions -for @var{method}. +for @var{method}. Example: @example @@ -1145,6 +1207,21 @@ in such files, it can return host names only. This function returns the host nicknames defined by @code{Host} entries in @file{~/.ssh/config} style files. +@item @code{tramp-parse-shostkeys} +@findex tramp-parse-shostkeys + +SSH2 parsing of directories @file{/etc/ssh2/hostkeys/*} and +@file{~/ssh2/hostkeys/*}. Hosts are coded in file names +@file{hostkey_PORTNUMBER_HOST-NAME.pub}. User names are always nil. + +@item @code{tramp-parse-sknownhosts} +@findex tramp-parse-shostkeys + +Another SSH2 style parsing of directories like +@file{/etc/ssh2/knownhosts/*} and @file{~/ssh2/knownhosts/*}. This +case, hosts names are coded in file names +@file{HOST-NAME.ALGORITHM.pub}. User names are always nil. + @item @code{tramp-parse-hosts} @findex tramp-parse-hosts @@ -1181,6 +1258,49 @@ Example: @end defun +@node Password caching +@section Reusing passwords for several connections. +@cindex passwords + +Sometimes it is necessary to connect to the same remote host several +times. Reentering passwords again and again would be annoying, when +the choosen method does not support access without password prompt +throught own configuration. + +By default, @tramp{} caches the passwords entered by you. They will +be reused next time if a connection needs them for the same user name +and host name, independant of the connection method. + +@vindex password-cache-expiry +Passwords are not saved permanently, that means the password caching +is limited to the lifetime of your @value{emacs-name} session. You +can influence the lifetime of password caching by customizing the +variable @code{password-cache-expiry}. The value is the number of +seconds how long passwords are cached. Setting it to @code{nil} +disables the expiration. + +@findex tramp-clear-passwd +A password is removed from the cache if a connection isn't established +successfully. You can remove a password from the cache also by +executing @kbd{M-x tramp-clear-passwd} in a buffer containing a +related remote file or directory. + +@vindex password-cache +If you don't like this feature for security reasons, password caching +can be disabled totally by customizing the variable +@code{password-cache} (setting it to @code{nil}). + +Implementation Note: password caching is based on the package +password.el in No Gnus. For the time being, it is activated only when +this package is seen in the @code{load-path} while loading @tramp{}. +@ifset tramp-inst +If you don't use No Gnus, you can take password.el from the @tramp{} +@file{contrib} directory, see @ref{Installation parameters}. +@end ifset +It will be activated mandatory once No Gnus has found its way into +@value{emacs-name}. + + @node Remote Programs @section How @tramp{} finds and uses programs on the remote machine. @@ -1241,7 +1361,7 @@ There are different possible strategies for pursuing this problem. One strategy is to enable @tramp{} to deal with all possible situations. This is a losing battle, since it is not possible to deal with @emph{all} situations. The other strategy is to require you to set up -the remote host such that it behaves like @tramp{} expect. This might +the remote host such that it behaves like @tramp{} expects. This might be inconvenient because you have to invest a lot of effort into shell setup before you can begin to use @tramp{}. @@ -1310,6 +1430,16 @@ The other approach is to teach @tramp{} about these questions. See the variables @code{tramp-actions-before-shell} and @code{tramp-multi-actions} (for multi-hop connections). + +@item Environment variables named like users in @file{.profile} + +If you have a user named frumple and set the variable @code{FRUMPLE} in +your shell environment, then this might cause trouble. Maybe rename +the variable to @code{FRUMPLE_DIR} or the like. + +This weird effect was actually reported by a @tramp{} user! + + @item Non-Bourne commands in @file{.profile} After logging in to the remote host, @tramp{} issues the command @@ -1364,22 +1494,21 @@ find out if the shell is Bourne-ish? @cindex backup @vindex backup-directory-alist -Explaining auto-save is still to do. - -Normally, Emacs writes backup files to the same directory as the -original files, but this behavior can be changed via the variable -@code{backup-directory-alist}. In connection with @tramp{}, this can -have unexpected side effects. Suppose that you specify that all backups -should go to the directory @file{~/.emacs.d/backups/}, and then you edit -the file @file{/su:root@@localhost:/etc/secretfile}. The effect is that -the backup file will be owned by you and not by root, thus possibly -enabling others to see it even if they were not intended to see it. +Normally, @value{emacs-name} writes backup files to the same directory +as the original files, but this behavior can be changed via the +variable @code{backup-directory-alist}. In connection with @tramp{}, +this can have unexpected side effects. Suppose that you specify that +all backups should go to the directory @file{~/.emacs.d/backups/}, and +then you edit the file @file{/su:root@@localhost:/etc/secretfile}. +The effect is that the backup file will be owned by you and not by +root, thus possibly enabling others to see it even if they were not +intended to see it. When @code{backup-directory-alist} is nil (the default), such problems do not occur. If you wish to customize the variable, the workaround is to include -special settings for Tramp files. For example, the following statement +special settings for @tramp{} files. For example, the following statement effectively `turns off' the effect of @code{backup-directory-alist} for @tramp{} files: @@ -1389,6 +1518,29 @@ effectively `turns off' the effect of @code{backup-directory-alist} for (cons tramp-file-name-regexp nil)) @end lisp +The same problem can happen with auto-saving files. +@ifset emacs +Since @value{emacs-name} 21, the variable +@code{auto-save-file-name-transforms} keeps information, on which +directory an auto-saved file should go. By default, it is initialized +for @tramp{} files to the local temporary directory. + +On some versions of @value{emacs-name}, namely the version built for +Debian Linux, the variable @code{auto-save-file-name-transforms} +contains the directory where @value{emacs-name} was built. A +workaround is to manually set the variable to a sane value. + +If auto-saved files should go into the same directory as the original +files, @code{auto-save-file-name-transforms} should be set to nil. + +Another possibility is to set the variable +@code{tramp-auto-save-directory} to a proper value. +@end ifset +@ifset xemacs +For this purpose you can set the variable +@code{tramp-auto-save-directory} to a proper value. +@end ifset + @node Windows setup hints @section Issues with Cygwin ssh @@ -1406,29 +1558,30 @@ setting up Cygwin in their FAQ at @uref{http://cygwin.com/faq/}. @cindex method scpx with Cygwin @cindex scpx method with Cygwin If you wish to use the @code{scpx} connection method, then you might -have the problem that Emacs calls @code{scp} with a Windows filename -such as @code{c:/foo}. The Cygwin version of @code{scp} does not know -about Windows filenames and interprets this as a remote filename on the -host @code{c}. +have the problem that @value{emacs-name} calls @code{scp} with a +Windows filename such as @code{c:/foo}. The Cygwin version of +@code{scp} does not know about Windows filenames and interprets this +as a remote filename on the host @code{c}. One possible workaround is to write a wrapper script for @code{scp} which converts the Windows filename to a Cygwinized filename. -I guess that another workaround is to run Emacs under Cygwin, or to run -a Cygwinized Emacs. +I guess that another workaround is to run @value{emacs-name} under +Cygwin, or to run a Cygwinized @value{emacs-name}. @cindex Cygwin and ssh-agent -@cindex SSH_AUTH_SOCK and Emacs on Windows +@cindex SSH_AUTH_SOCK and @value{emacs-name} on Windows If you want to use either @code{ssh} based method on Windows, then you might encounter problems with @code{ssh-agent}. Using this program, you can avoid typing the pass-phrase every time you log in (and the @code{scpx} method more or less requires you to use @code{ssh-agent} because it does not allow you to type a password or pass-phrase). -However, if you start Emacs from a desktop shortcut, then the -environment variable @code{SSH_AUTH_SOCK} is not set and so Emacs and -thus @tramp{} and thus @code{ssh} and @code{scp} started from @tramp{} -cannot communicate with @code{ssh-agent}. It works better to start -Emacs from the shell. +However, if you start @value{emacs-name} from a desktop shortcut, then +the environment variable @code{SSH_AUTH_SOCK} is not set and so +@value{emacs-name} and thus @tramp{} and thus @code{ssh} and +@code{scp} started from @tramp{} cannot communicate with +@code{ssh-agent}. It works better to start @value{emacs-name} from +the shell. If anyone knows how to start @code{ssh-agent} under Windows in such a way that desktop shortcuts can profit, please holler. I don't really @@ -1436,8 +1589,8 @@ know anything at all about Windows@dots{} @node Usage -@chapter Using @tramp -@cindex using @tramp +@chapter Using @tramp{} +@cindex using @tramp{} Once you have installed @tramp{} it will operate fairly transparently. You will be able to access files on any remote machine that you can log in @@ -1448,15 +1601,15 @@ details of the system to connect to. This is similar to the syntax used by the @value{ftp-package-name} package. @cindex type-ahead -Something that might happen which surprises you is that Emacs -remembers all your keystrokes, so if you see a password prompt from -Emacs, say, and hit @kbd{@key{RET}} twice instead of once, then the -second keystroke will be processed by Emacs after @tramp{} has done -its thing. Why, this type-ahead is normal behavior, you say. Right -you are, but be aware that opening a remote file might take quite a -while, maybe half a minute when a connection needs to be opened. -Maybe after half a minute you have already forgotten that you hit that -key! +Something that might happen which surprises you is that +@value{emacs-name} remembers all your keystrokes, so if you see a +password prompt from @value{emacs-name}, say, and hit @kbd{@key{RET}} +twice instead of once, then the second keystroke will be processed by +@value{emacs-name} after @tramp{} has done its thing. Why, this +type-ahead is normal behavior, you say. Right you are, but be aware +that opening a remote file might take quite a while, maybe half a +minute when a connection needs to be opened. Maybe after half a +minute you have already forgotten that you hit that key! @menu * Filename Syntax:: @tramp{} filename conventions. @@ -1532,9 +1685,9 @@ This is done by replacing the initial The user, machine and file specification remain the same. So, to connect to the machine @code{melancholia} as @code{daniel}, -using the @option{su} method to transfer files, and edit @file{.emacs} +using the @option{ssh} method to transfer files, and edit @file{.emacs} in my home directory I would specify the filename -@file{@value{tramp-prefix}su@value{tramp-postfix-single-hop}daniel@@melancholia@value{tramp-postfix}.emacs}. +@file{@value{tramp-prefix}ssh@value{tramp-postfix-single-hop}daniel@@melancholia@value{tramp-postfix}.emacs}. @node Multi-hop filename syntax @@ -1544,7 +1697,7 @@ in my home directory I would specify the filename The syntax of multi-hop file names is necessarily slightly different than the syntax of other @tramp{} file names. Here's an example -multi-hop file name, first in Emacs syntax and then in XEmacs syntax: +multi-hop file name: @example @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 @@ -1618,7 +1771,7 @@ is a possible completion for the respective method, machine, @end ifset and @samp{@value{tramp-prefix-single-hop}toto@value{tramp-postfix}} -might be a host @tramp has detected in your @file{~/.ssh/known_hosts} +might be a host @tramp{} has detected in your @file{~/.ssh/known_hosts} file (given you're using default method @option{ssh}). If you go on to type @kbd{e @key{TAB}}, the minibuffer is completed to @@ -1707,7 +1860,7 @@ Where can I get the latest @tramp{}? There is also a Savannah project page. @noindent -@uref{https://savannah.gnu.org/projects/tramp/} +@uref{http://savannah.nongnu.org/projects/tramp/} @item Which systems does it work on? @@ -1717,8 +1870,9 @@ as XEmacs 21. XEmacs 20 is more problematic, see the notes in @file{tramp.el}. I don't think anybody has really tried it on Emacs 19. The package was intended to work on Unix, and it really expects a -Unix-like system on the remote end, but some people seemed to have some -success getting it to work on NT Emacs. +Unix-like system on the remote end (except the @option{smb} method), +but some people seemed to have some success getting it to work on NT +Emacs. There is some informations on @tramp{} on NT at the following URL; many thanks to Joe Stoy for providing the information: @@ -1744,7 +1898,7 @@ packages which make @value{ftp-package-name} file name handlers active. You can see it applying @kbd{C-h v file-name-handler-alist}: @example -file-name-handler-alist's value is +file-name-handler-alist's value is (("^/[^/:]*\\'" . ange-ftp-completion-hook-function) ("^/[^/:]*[^/:.]:" . ange-ftp-hook-function) ("^/[^/]*$" . tramp-completion-file-name-handler) @@ -1826,8 +1980,9 @@ work on NT with some tweaking. @item How can I get notified when @tramp{} file transfers are complete? -The following snippet can be put in your @file{~/.emacs} file. It makes -Emacs beep after reading from or writing to the remote host. +The following snippet can be put in your @file{~/.emacs} file. It +makes @value{emacs-name} beep after reading from or writing to the +remote host. @lisp (defadvice tramp-handle-write-region @@ -1931,7 +2086,7 @@ operations on files accessed via @tramp{}. In the case of a remote file, the @code{shell-command} interface is used, with some wrapper code, to provide the same functionality on the -remote machine as would be seen on the local machine. +remote machine as would be seen on the local machine. @node Changed workfiles @@ -1974,10 +2129,11 @@ Minor implementation details, &c. @node Remote File Ownership @subsection How VC determines who owns a workfile -Emacs provides the @code{user-full-name} function to return the login name -of the current user as well as mapping from arbitrary user id values -back to login names. The VC code uses this functionality to map from the -uid of the owner of a workfile to the login name in some circumstances. +@value{emacs-name} provides the @code{user-full-name} function to +return the login name of the current user as well as mapping from +arbitrary user id values back to login names. The VC code uses this +functionality to map from the uid of the owner of a workfile to the +login name in some circumstances. This will not, for obvious reasons, work if the remote system has a different set of logins. As such, it is necessary to delegate to the @@ -2095,6 +2251,29 @@ uses EFS for downloading new packages. So, obviously, EFS has to be installed from the start. If the filenames were unified, @tramp{} would have to be installed from the start, too. +@ifset xemacs +@strong{Note:} If you'ld like to use a similar syntax like +@value{ftp-package-name}, you need the following settings in your init +file: + +@lisp +(setq tramp-unified-filenames t) +(require 'tramp) +@end lisp + +The autoload of the @value{emacs-name} @tramp{} package must be +disabled. This can be achieved by setting file permissions @code{000} +to the files @file{.../xemacs-packages/lisp/tramp/auto-autoloads.el*}. + +In case of unified filenames, all @value{emacs-name} download sites +are added to @code{tramp-default-method-alist} with default method +@code{ftp} @xref{Default Method}. These settings shouldn't be touched +for proper working of the @value{emacs-name} package system. + +The syntax for unified filenames is described in the @tramp{} manual +for @value{emacs-other-name}. +@end ifset + @end itemize @node Concept Index @@ -2119,3 +2298,7 @@ would have to be installed from the start, too. @c ** Use `filename' resp. `file name' consistently. @c ** Use `host' resp. `machine' consistently. @c ** Consistent small or capitalized words especially in menues. + +@ignore + arch-tag: f96dd66e-6dd3-4c92-8d77-9c56205ba808 +@end ignore |