(org-export-with-timestamps)
[bpt/emacs.git] / man / tramp.texi
index d4408fa..48d13b6 100644 (file)
@@ -8,74 +8,63 @@
 @c This is *so* much nicer :)
 @footnotestyle end
 
+@c In the Tramp CVS, the version number is auto-frobbed from
+@c configure.ac, so you should edit that file and run
+@c "autoconf && ./configure" to change the version number.
+
+@c Additionally, flags are set with respect to the Emacs flavor; and
+@c depending whether Tramp is packaged into (X)Emacs, or standalone.
+
+@include trampver.texi
+
+@c Macros for formatting a filename.
+@c trampfn is for a full filename, trampfnmhp means method, host, localname
+@c were given, and so on.
+@macro trampfn(method, user, host, localname)
+@value{prefix}@value{method}@value{user}@@@value{host}@value{postfix}@value{localname}
+@end macro
+
+@copying
+Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+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.2 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
 
 @c Entries for @command{install-info} to use
+@dircategory @value{emacsname}
 @direntry
 * TRAMP: (tramp).                Transparent Remote Access, Multiple Protocol
-                                 Emacs remote file access via rsh and rcp.
+                                 @value{emacsname} remote file access via rsh and rcp.
 @end direntry
 
-@c Macro to make formatting of the tramp program name consistent.
-@macro tramp
-@sc{tramp}
-@end macro
-
-@c Copying permissions, et al
-@ifinfo
-This file documents @tramp{}, a remote file editing package for Emacs and
-XEmacs.
-     
-Copyright @copyright{} 1999, 2000 Free Software Foundation, Inc.
-     
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-     
-@ignore 
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries a copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-   
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-sections entitled ``Copying'' and ``GNU General Public License'' are
-included exactly as in the original, and provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-     
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by the Free Software Foundation.
-@end ifinfo
-
 @tex
 
 @titlepage
-@title @tramp{} User Manual
+@title @value{tramp} version @value{trampver} User Manual
 
 @author by Daniel Pittman
 @author based on documentation by Kai Gro@ss{}johann
-@page
 
-@vskip 0pt plus 1filll
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-     
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-sections entitled ``Copying'' and ``GNU General Public License'' are
-included exactly as in the original, and provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-     
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by the Free Software Foundation.
+@page
+@insertcopying
 
 @end titlepage
 @page
@@ -83,63 +72,106 @@ approved by the Free Software Foundation.
 @end tex
 
 @ifnottex
-@node Top, Copying, (dir), (dir)
-@top @tramp{} User Manual
+@node Top, Overview, (dir), (dir)
+@top @value{tramp} version @value{trampver} User Manual
 
-@tramp{} stands for `Transparent Remote (file) Access, Multiple
+This file documents @value{tramp} version @value{trampver}, a remote file
+editing package for @value{emacsname}.
+
+@value{tramp} stands for `Transparent Remote (file) Access, Multiple
 Protocol'.  This package provides remote file editing, similar to
-@cite{ange-ftp} and @cite{EFS}.
+@value{ftppackagename}.
 
-The difference is that ange-ftp uses FTP to transfer files between the
-local and the remote host, whereas @tramp{} uses a combination of
-@command{rsh} and @command{rcp} or other work-alike programs, such as
-@command{ssh}/@command{scp}.
+The difference is that @value{ftppackagename} uses FTP to transfer
+files between the local and the remote host, whereas @value{tramp} uses a
+combination of @command{rsh} and @command{rcp} or other work-alike
+programs, such as @command{ssh}/@command{scp}.
 
 You can find the latest version of this document on the web at
-@uref{http://www.freesoftware.fsf.org/tramp/}.
+@uref{http://www.gnu.org/software/tramp/}.
+
+@c Pointer to the other Emacs flavor is necessary only in case of
+@c standalone installation.
+@ifset installchapter
+The manual has been generated for @value{emacsname}.
+@ifinfo
+If you want to read the info pages for @value{emacsothername}, you
+should read in @ref{Installation} how to create them.
+@end ifinfo
+@ifhtml
+If you're using the other Emacs flavor, you should read the
+@uref{@value{emacsotherfilename}, @value{emacsothername}} pages.
+@end ifhtml
+@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{japanesemanual},
+Japanese translation}.
+@end ifset
 
-The latest release of @tramp{} is available for
-@uref{http://savannah.gnu.org/download/tramp/,
-download}, or you may see @ref{Obtaining @tramp{}} for more details,
-including the CVS server details.
+The latest release of @value{tramp} is available for
+@uref{ftp://ftp.gnu.org/gnu/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/,
+@value{tramp} also has a @uref{http://savannah.gnu.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.
+There is a mailing list for @value{tramp}, available at
+@email{tramp-devel@@gnu.org}, and archived at
+@uref{http://lists.gnu.org/archive/html/tramp-devel/, the
+@value{tramp} 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
 
 @end ifnottex
 
 @menu
-* Copying::                     @tramp{} Copying conditions.
-* Overview::                    What @tramp{} can and cannot do.
+* Overview::                    What @value{tramp} can and cannot do.
 
 For the end user:
-* Obtaining @tramp{}::          How to obtain @tramp{}.
-* History::                     History of @tramp{}
-* Installation::                Installing @tramp{} with your (X)Emacs.
-* Configuration::               Configuring @tramp{} for use.
-* Usage::                       An overview of the operation of @tramp{}.
-* Bug Reports::                 Reporting Bugs and Problems
+
+* Obtaining Tramp::             How to obtain @value{tramp}.
+* History::                     History of @value{tramp}.
+@ifset installchapter
+* Installation::                Installing @value{tramp} with your @value{emacsname}.
+@end ifset
+* Configuration::               Configuring @value{tramp} for use.
+* Usage::                       An overview of the operation of @value{tramp}.
+* Bug Reports::                 Reporting Bugs and Problems.
 * Frequently Asked Questions::  Questions and answers from the mailing list.
+* Concept Index::               An item for each concept.
 
 For the developer:
+
 * Version Control::             The inner workings of remote version control.
-* Files directories and paths::  How file names, directories and paths are mangled and managed.
-* Issues::                      
+* Files directories and localnames::  How file names, directories and localnames are mangled and managed.
+* Issues::                      Debatable Issues and What Was Decided.
 
 @detailmenu
  --- The Detailed Node Listing ---
+@c
+@ifset installchapter
+Installing @value{tramp} with your @value{emacsname}
+
+* Installation parameters::     Parameters in order to control installation.
+* Load paths::                  How to plug-in @value{tramp} into your environment.
+* Japanese manual::             Japanese manual.
 
-Configuring @tramp{} for use
+@end ifset
+
+Configuring @value{tramp} for use
 
 * Connection types::            Types of connections made to remote machines.
 * Inline methods::              Inline methods.
@@ -147,14 +179,20 @@ Configuring @tramp{} for use
 * Multi-hop Methods::           Connecting to a remote host using multiple hops.
 * Default Method::              Selecting a default method.
 * Customizing Methods::         Using Non-Standard Methods.
-* Remote Programs::             How @tramp{} finds and uses programs on the remote machine.
-* Remote shell setup::          
+* Customizing Completion::      Selecting config files for user/host name completion.
+* Password caching::            Reusing passwords for several connections.
+* Remote Programs::             How @value{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 @value{tramp}
 
-* Filename Syntax::             @tramp{} filename conventions.
-* Multi-hop filename syntax::   Multi-hop filename conventions
-* Dired::                       Dired and filename completion.
+* Filename Syntax::             @value{tramp} filename conventions.
+* Multi-hop filename syntax::   Multi-hop filename conventions.
+* Filename completion::         Filename completion.
+* Dired::                       Dired.
+* Compilation::                 Compile remote files.
 
 The inner workings of remote version control
 
@@ -162,153 +200,137 @@ The inner workings of remote version control
 * Remote Commands::             Executing the version control commands on the remote machine.
 * Changed workfiles::           Detecting if the working file has changed.
 * Checking out files::          Bringing the workfile out of the repository.
-* 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.
 
 Things related to Version Control that don't fit elsewhere
 
 * Remote File Ownership::       How VC determines who owns a workfile.
 * Back-end Versions::           How VC determines what release your RCS is.
 
-How file names, directories and paths are mangled and managed.
+How file names, directories and localnames are mangled and managed
 
-* Path deconstruction::         Breaking a path into its components.
+* Localname deconstruction::    Breaking a localname into its components.
 
 @end detailmenu
 @end menu
 
-@node Copying
-@chapter @tramp{} Copying conditions
-
-Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
-
-tramp.el is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-tramp.el is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-more details.
-
-You should have received a copy of the GNU General Public License along
-with GNU Emacs; see the file COPYING. If not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-
 @node Overview
-@chapter An overview of @tramp
+@chapter An overview of @value{tramp}
+@cindex overview
 
-After the installation of @tramp{} into your Emacs, you will be able to
-access files on remote machines as though they were local. Access to the
-remote file system for editing files, version control, and
-@command{dired} are transparently enabled.
+After the installation of @value{tramp} into your @value{emacsname},
+you will be able to access files on remote machines as though they
+were local.  Access to the remote file system for editing files,
+version control, and @code{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 relatively
-secure access to machines, especially if @command{ftp} access is
-disabled.
-
-The majority of activity carried out by @tramp{} requires only that the
-remote login is possible and is carried out at the terminal. In order to
-access remote files @tramp{} needs to transfer their content to the local
-machine temporarily.
-
-@tramp{} can transfer files between the machines in a variety of ways. The
-details are easy to select, depending on your needs and the machines in
-question.
-
-The fastest transfer methods rely on a remote file transfer package such
-as @command{rcp}, @command{scp} or @command{rsync}. The use of these
-methods is only possible if the file copy command does not ask for a
-password for the remote machine.
-
-If the remote copy methods are not suitable for you, @tramp{} also
-supports the use of encoded transfers directly through the shell. This
-requires that the @command{mimencode} or @command{uuencode} tools are
-available on the remote machine.
-
-Within these limitations, @tramp{} is quite powerful. It is worth noting
-that, as of the time of writing, it is far from a polished end-user
-product. For a while yet you should expect to run into rough edges and
-problems with the code now and then.
+box, one of the more common uses of the package.  This allows
+relatively secure access to machines, especially if @command{ftp}
+access is disabled.
+
+The majority of activity carried out by @value{tramp} requires only that
+the remote login is possible and is carried out at the terminal.  In
+order to access remote files @value{tramp} needs to transfer their content
+to the local machine temporarily.
+
+@value{tramp} can transfer files between the machines in a variety of ways.
+The details are easy to select, depending on your needs and the
+machines in question.
+
+The fastest transfer methods (for large files) rely on a remote file
+transfer package such as @command{rcp}, @command{scp} or
+@command{rsync}.
+
+If the remote copy methods are not suitable for you, @value{tramp} also
+supports the use of encoded transfers directly through the shell.
+This requires that the @command{mimencode} or @command{uuencode} tools
+are available on the remote machine.  These methods are generally
+faster for small files.
+
+Within these limitations, @value{tramp} is quite powerful.  It is worth
+noting that, as of the time of writing, it is far from a polished
+end-user product.  For a while yet you should expect to run into rough
+edges and problems with the code now and then.
 
 It is finished enough that the developers use it for day to day work but
 the installation and setup can be a little difficult to master, as can
 the terminology.
 
-@tramp{} is still under active development and any problems you encounter,
-trivial or major, should be reported to the @tramp{} developers.
+@value{tramp} is still under active development and any problems you encounter,
+trivial or major, should be reported to the @value{tramp} developers.
 @xref{Bug Reports}.
 
 
 @subsubheading Behind the scenes
+@cindex behind the scenes
+@cindex details of operation
+@cindex how it works
 
 This section tries to explain what goes on behind the scenes when you
-access a remote file through @tramp{}.
+access a remote file through @value{tramp}.
 
-Suppose you type @kbd{C-x C-f} and enter part of an @tramp{} file name,
+Suppose you type @kbd{C-x C-f} and enter part of an @value{tramp} file name,
 then hit @kbd{@key{TAB}} for completion.  Suppose further that this is
-the first time that @tramp{} is invoked for the host in question.  Here's
+the first time that @value{tramp} is invoked for the host in question.  Here's
 what happens:
 
 @itemize
 @item
-@tramp{} discovers that it needs a connection to the host. So it invokes
-@command{telnet HOST} or @command{rsh HOST -l USER} or a similar tool to
-connect to the remote host. Communication with this process happens
-through an Emacs buffer, that is, the output from the remote end goes
-into a buffer.
+@value{tramp} discovers that it needs a connection to the host.  So it
+invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l
+@var{user}} or a similar tool to connect to the remote host.
+Communication with this process happens through an
+@value{emacsname} buffer, that is, the output from the remote end
+goes into a buffer.
 
 @item
-The remote host may prompt for a login name (for @command{telnet}).  The
-login name is given in the file name, so @tramp{} sends the login name and
-a newline.
+The remote host may prompt for a login name (for @command{telnet}).
+The login name is given in the file name, so @value{tramp} sends the
+login name and a newline.
 
 @item
 The remote host may prompt for a password or pass phrase (for
 @command{rsh} or for @command{telnet} after sending the login name).
-@tramp{} displays the prompt in the minibuffer, asking you for the
+@value{tramp} displays the prompt in the minibuffer, asking you for the
 password or pass phrase.
 
-You enter the password or pass phrase.  @tramp{} sends it to the remote
+You enter the password or pass phrase.  @value{tramp} sends it to the remote
 host, followed by a newline.
 
 @item
-@tramp{} now waits for the shell prompt or for a message that the login
+@value{tramp} now waits for the shell prompt or for a message that the login
 failed.
 
-If @tramp{} sees neither of them after a certain period of time (a minute,
+If @value{tramp} sees neither of them after a certain period of time (a minute,
 say), then it issues an error message saying that it couldn't find the
 remote shell prompt and shows you what the remote host has sent.
 
-If @tramp{} sees a `login failed' message, it tells you so, aborts the
-login attempt and allows you to try again.
+If @value{tramp} sees a @samp{login failed} message, it tells you so,
+aborts the login attempt and allows you to try again.
 
 @item
-Suppose that the login was successful and @tramp{} sees the shell prompt
-from the remote host.  Now @tramp{} invokes @command{/bin/sh} because
+Suppose that the login was successful and @value{tramp} sees the shell prompt
+from the remote host.  Now @value{tramp} invokes @command{/bin/sh} because
 Bourne shells and C shells have different command
 syntaxes.@footnote{Invoking @command{/bin/sh} will fail if your login
-shell doesn't recognize @command{exec /bin/sh} as a valid command.
+shell doesn't recognize @samp{exec /bin/sh} as a valid command.
 Maybe you use the Scheme shell @command{scsh}@dots{}}
 
-After the Bourne shell has come up, @tramp{} sends a few commands to
+After the Bourne shell has come up, @value{tramp} sends a few commands to
 ensure a good working environment.  It turns off echoing, it sets the
 shell prompt, and a few other things.
 
 @item
 Now the remote shell is up and it good working order.  Remember, what
-was supposed to happen is that @tramp{} tries to find out what files exist
+was supposed to happen is that @value{tramp} tries to find out what files exist
 on the remote host so that it can do filename completion.
 
-So, @tramp{} basically issues @command{cd} and @command{ls} commands and
+So, @value{tramp} basically issues @command{cd} and @command{ls} commands and
 also sometimes @command{echo} with globbing.  Another command that is
 often used is @command{test} to find out whether a file is writable or a
 directory or the like.  The output of each command is parsed for the
@@ -320,17 +342,19 @@ C-f}, a full file name and hit @kbd{@key{RET}}.  Now comes the time to
 transfer the file contents from the remote host to the local host so
 that you can edit them.
 
-See above for an explanation of how @tramp{} transfers the file contents.
+See above for an explanation of how @value{tramp} transfers the file contents.
 
-For inline transfers, @tramp{} issues a command like @command{mimencode -b
+For inline transfers, @value{tramp} issues a command like @samp{mimencode -b
 /path/to/remote/file}, waits until the output has accumulated in the
 buffer that's used for communication, then decodes that output to
 produce the file contents.
 
-For out-of-band transfers, @tramp{} issues a command like @command{rcp
-user@@host:/path/to/remote/file /tmp/tramp.4711} and then reads the local
-temporary file @file{/tmp/tramp.4711} into a buffer and deletes the
-temporary file.
+For out-of-band transfers, @value{tramp} issues a command like the following:
+@example
+rcp user@@host:/path/to/remote/file /tmp/tramp.4711
+@end example
+It then reads the local temporary file @file{/tmp/tramp.4711} into a
+buffer and deletes the temporary file.
 
 @item
 You now edit the buffer contents, blithely unaware of what has happened
@@ -338,191 +362,118 @@ behind the scenes.  (Unless you have read this section, that is.)  When
 you are finished, you type @kbd{C-x C-s} to save the buffer.
 
 @item
-Again, @tramp{} transfers the file contents to the remote host either
+Again, @value{tramp} transfers the file contents to the remote host either
 inline or out-of-band.  This is the reverse of what happens when reading
 the file.
-
 @end itemize
 
 I hope this has provided you with a basic overview of what happens
-behind the scenes when you open a file with @tramp{}.
+behind the scenes when you open a file with @value{tramp}.
 
 
 @c For the end user
-@node Obtaining @tramp{}
-@chapter Obtaining @tramp{}.
-
-@tramp{} is freely available on the Internet and the latest release may be
-downloaded from
-@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}. This
-release includes the full documentation and code for @tramp{}, suitable
-for installation.
-
-For the especially brave, @tramp{} is available from CVS. The CVS version
-is the latest version of the code and may contain incomplete features or
-new issues. Use these versions at your own risk.
-
-Instructions for obtaining the latest development version of @tramp{}
-from CVS can be found by going to the Savannah project page at
-@uref{http://savannah.gnu.org/projects/tramp/} and then clicking on the
-CVS link in the navigation bar at the top.  Or follow the example
-session below:
+@node Obtaining Tramp
+@chapter Obtaining Tramp.
+@cindex obtaining Tramp
+
+@value{tramp} is freely available on the Internet and the latest
+release may be downloaded from
+@uref{ftp://ftp.gnu.org/gnu/tramp/}. This release includes the full
+documentation and code for @value{tramp}, suitable for installation.
+But GNU Emacs (22 or later) includes @value{tramp} already, and there
+is a @value{tramp} package for XEmacs, as well.  So maybe it is easier
+to just use those.  But if you want the bleeding edge, read
+on@dots{...}
+
+For the especially brave, @value{tramp} is available from CVS.  The CVS
+version is the latest version of the code and may contain incomplete
+features or new issues. Use these versions at your own risk.
+
+Instructions for obtaining the latest development version of @value{tramp}
+from CVS can be found by going to the Savannah project page at the
+following URL and then clicking on the CVS link in the navigation bar
+at the top.
+
+@noindent
+@uref{http://savannah.gnu.org/projects/tramp/}
+
+@noindent
+Or follow the example session below:
 
 @example
-] @strong{cd ~/lisp}
-] @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{cd ~/@value{emacsdir}}
+] @strong{export CVS_RSH="ssh"}
+] @strong{cvs -z3 -d:ext:anoncvs@@savannah.gnu.org:/cvsroot/tramp co tramp}
 @end example
 
-You should now have a directory @file{~/lisp/tramp} containing the latest
-version of @tramp{}. You can fetch the latest updates from the repository
-by issuing the command:
+@noindent
+You should now have a directory @file{~/@value{emacsdir}/tramp}
+containing the latest version of @value{tramp}. You can fetch the latest
+updates from the repository by issuing the command:
 
 @example
-] @strong{cd ~/lisp/tramp}
+] @strong{cd ~/@value{emacsdir}/tramp}
+] @strong{export CVS_RSH="ssh"}
 ] @strong{cvs update -d}
 @end example
 
+@noindent
+Once you've got updated files from the CVS repository, you need to run
+@command{autoconf} in order to get an up-to-date @file{configure}
+script:
 
-@node History
-@chapter History of @tramp{}
-
-Development was started end of November 1998.  The package was called
-`rssh.el', back then.  It only provided one method to access a file,
-using @command{ssh} to log in to a remote host and using @command{scp}
-to transfer the file contents.  After a while, the name was changed to
-`rcp.el', and now it's @tramp{}.  Along the way, many more methods for
-getting a remote shell and for transferring the file contents were
-added.  Support for VC was added.
-
-The most recent addition of a major feature was the multi-hop methods
-added in April 2000.
-
-
-@node Installation
-@chapter Installing @tramp{} into Emacs or XEmacs
-
-Installing @tramp{} into your Emacs or XEmacs is a relatively easy
-process, at least compared to rebuilding your machine from scratch. ;)
-
-Seriously though, the installation should be a fairly simple matter.
-
-The easiest way to proceed is as follows:
-
-@itemize
-@item
-Choose a directory, say @file{~/emacs/}.  Change into that directory and
-unpack the tarball.  This will give you a directory
-@file{~/emacs/tramp/} which contains subdirectories @file{lisp} for the
-Lisp code and @file{texi} for the documentation.
-
-@item
-Optionally byte-compile all files in the Lisp directory,
-@file{~/emacs/tramp/lisp/}, by issuing a command like the following from
-the top level directory @file{~/emacs/tramp/}:
-@example
-make EMACS=emacs all            # for Emacs users
-make EMACS=xemacs all           # for XEmacs users
-@end example
-
-@item
-NOTE:
-@example
-If you run into problems running the example @command{make}
-commands, don't dispare.  You can still byte compile the
-@file{*.el} files by opening emacs in @command{dired}
-(@command{C-x d}) mode, at @file{~/tramp/lisp}.  Mark the lisp
-files with @command{m}, then press @command{B} to byte compile
-your selections.
-
-Something similar can be done to create the info manual.  
-Just cd to @file{~/emacs/tramp/texi} and load the @file{tramp.texi}
-file in emacs.  Then press @command{M-x makeinfo-buffer <RET>}
-to generate @file{tramp.info}.
-@end example     
-
-@item
-Tell Emacs about the new Lisp directory and the @tramp{} package 
-with the following lines in @file{~/.emacs}:
-@lisp
-(add-to-list 'load-path "~/emacs/tramp/lisp/")
-(require 'tramp)
-@end lisp
-
-@item
-To be able to read the Info documentation, create a file
-@file{~/emacs/tramp/texi/dir} using for example the
-@command{install-info} command, and add the directory to the search 
-path for Info.
-
-@item
-NOTE:
 @example
-On systems using `gnu' @command{install-info}, the
-@command{install-info} syntax is very direct and simple.  One can 
-cd to @file{~/emacs/tramp/texi} and type:
-    @command{install-info tramp.info dir}
-and a @file{dir} file will be created with the @tramp{}
-entry.  The info reader will know how to interpret it, but must
-be told where to find it (see below).  If you want anything fancier
-you'll need to look through @command{man install-info}.
-
-Debian gnu/linux doesn't default to `gnu' @command{install-info} and
-uses its own version.  This version does not create a @file{dir} file
-for you from scratch.  You must provide a skeleton dir file it
-recognizes.  One can be found in a default install at
-@file{/usr/info/dir}.  Copy the top of this file down to the first
-occurrence of `* Menu' including that line plus one more blank line,
-to your working directory @file{texi/dir}, or use the sample provided
-in the @file{texi} directroy of this distribution.  See
-@file{texi/dir_sample}
-
-Once a @file{dir} file is in place, this command will make the entry.
-     install-info --infodir=. tramp.info
-If you want it in a specific category
-   (see @command{man install-info} for further details)
+] @strong{cd ~/@value{emacsdir}/tramp}
+] @strong{autoconf}
 @end example
 
-If the environment variable @env{INFOPATH} is set, add the directory
-@file{~/emacs/tramp/texi/} to it.  Else, add the directory to
-@code{Info-default-directory-list}, as follows:
-@lisp
-(add-to-list 'Info-default-directory-list "~/emacs/tramp/texi/")
-@end lisp
-XEmacs 21 users should use @code{Info-directory-list} rather than
-@code{Info-default-directory-list}.
-
-@end itemize
 
+@node History
+@chapter History of @value{tramp}
+@cindex history
+@cindex development history
 
-For XEmacs users, the package @command{fsf-compat} must be installed.
-For details on package installation, see @ref{Packages, , ,xemacs}.
-@ifhtml
-(If the previous link doesn't work, try the XEmacs documentation at
-@uref{http://www.xemacs.org/Documentation/packageGuide.html,the XEmacs
-site}.)
-@end ifhtml
+Development was started end of November 1998.  The package was called
+@file{rssh.el}, back then.  It only provided one method to access a
+file, using @command{ssh} to log in to a remote host and using
+@command{scp} to transfer the file contents.  After a while, the name
+was changed to @file{rcp.el}, and now it's @value{tramp}.  Along the way,
+many more methods for getting a remote shell and for transferring the
+file contents were added.  Support for VC was added.
+
+The most recent addition of major features were the multi-hop methods
+added in April 2000 and the unification of @value{tramp} and Ange-FTP
+filenames in July 2002.
+
+@c Installation chapter is necessary only in case of standalone
+@c installation.  Text taken from trampinst.texi.
+@ifset installchapter
+@include trampinst.texi
+@end ifset
 
 @node Configuration
-@chapter Configuring @tramp{} for use
+@chapter Configuring @value{tramp} for use
+@cindex configuration
 
-@tramp{} is (normally) fully functional when it is initially
-installed. It is initially configured to use the @command{rsh} and
-@command{rcp} programs to connect to the remote host.
+@cindex default configuration
+@value{tramp} is (normally) fully functional when it is initially
+installed.  It is initially configured to use the @command{scp}
+program to connect to the remote host.  So in the easiest case, you
+just type @kbd{C-x C-f} and then enter the filename
+@file{@value{prefix}@var{user}@@@var{machine}@value{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
 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{} can use to
-connect to remote machines and transfer files (@pxref{Connection types}).
+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 @value{tramp} uses.  There are several different methods that @value{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
@@ -531,48 +482,66 @@ connect to remote machines and transfer files (@pxref{Connection types}).
 * 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.
-* Remote Programs::             How @tramp{} finds and uses programs on the remote machine.
+* Customizing Completion::      Selecting config files for user/host name completion.
+* Password caching::            Reusing passwords for several connections.
+* Remote Programs::             How @value{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.
 @end menu
 
 
 @node Connection types
 @section Types of connections made to remote machines.
+@cindex connection types, overview
 
 There are two basic types of transfer methods, each with its own
-advantages and limitations. Both types of connection make use of a
+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 @value{tramp}
 requires to make the remote file system transparently accessible from
 the local machine. It is only when visiting files that the methods
 differ.
 
-Loading or saving a remote file requires that the content of the file be
-transfered between the two machines. The content of the file can be
-transfered over the same connection used to log in to the remote machine
-or the file can be transfered through another connection using a remote
-copy program such as @command{rcp}, @command{scp} or @command{rsync}.
-The former are called @dfn{inline methods}, the latter are called
-@dfn{external transfer methods}.
+@cindex inline methods
+@cindex external transfer methods
+@cindex external methods
+@cindex out-of-band methods
+@cindex methods, inline
+@cindex methods, external transfer
+@cindex methods, out-of-band
+Loading or saving a remote file requires that the content of the file
+be transfered between the two machines. The content of the file can be
+transfered over the same connection used to log in to the remote
+machine or the file can be transfered through another connection using
+a remote copy program such as @command{rcp}, @command{scp} or
+@command{rsync}.  The former are called @dfn{inline methods}, the
+latter are called @dfn{out-of-band methods} or @dfn{external transfer
+methods} (@dfn{external methods} for short).
 
 The performance of the external transfer methods is generally better
-than that of the inline methods.  This is caused by the need to encode
-and decode the data when transferring inline.
+than that of the inline methods, at least for large files.  This is
+caused by the need to encode and decode the data when transferring
+inline.
 
 The one exception to this rule are the @command{scp} based transfer
 methods.  While these methods do see better performance when actually
 transferring files, the overhead of the cryptographic negotiation at
 startup may drown out the improvement in file transfer times.
 
-External transfer methods do require that the remote copy command is not
-interactive --- that is, the command does not prompt you for a password.
-If you cannot perform remote copies without a password, you will need to
-use an inline transfer method to work with @tramp{}.
+External transfer methods should be configured such a way that they
+don't require a password (with @command{ssh-agent}, or such alike).
+If it isn't possible, you should consider @ref{Password caching},
+otherwise you will be prompted for a password every copy action.
 
+@cindex multi-hop methods
+@cindex methods, multi-hop
 A variant of the inline methods are the @dfn{multi-hop methods}.
 These methods allow you to connect a remote host using a number `hops',
 each of which connects to a different host.  This is useful if you are
@@ -582,8 +551,10 @@ connect to the outside world.
 
 @node Inline methods
 @section Inline methods
+@cindex inline methods
+@cindex methods, inline
 
-The inline methods in @tramp{} are quite powerful and can work in
+The inline methods in @value{tramp} are quite powerful and can work in
 situations where you cannot use an external transfer program to connect.
 Inline methods are the only methods that work when connecting to the
 remote machine via telnet.  (There are also strange inline methods which
@@ -591,43 +562,55 @@ 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, @value{tramp} may be able to
+use features of @value{emacsname} to decode and encode the files or
+it may require access to external commands to perform that task.
 
-@tramp{} supports the use of @command{uuencode} to transfer files. This is
-@emph{not} recommended. The @command{uuencode} and @command{uudecode}
-commands are not well standardized and may not function correctly or at
-all on some machines, notably AIX and IRIX. These systems do not work
-with @command{uuencode} at all.  (But do see the note about AIX in the
-documentation for @var{tramp-methods}.)
+@cindex uuencode
+@cindex mimencode
+@cindex base-64 encoding
+@value{tramp} checks the availability and usability of commands like
+@command{mimencode} (part of the @command{metamail} package) or
+@command{uuencode} on the remote host.  The first reliable command
+will be used.  The search path can be customized, see @ref{Remote
+Programs}.
 
-In summary, if possible use the @command{mimencode} methods to transfer
-the data base64 encoded. This has the advantage of using a built-in
-command in every modern Emacs, improving performance.
+If both commands aren't available on the remote host, @value{tramp}
+transfers a small piece of Perl code to the remote host, and tries to
+apply it for encoding and decoding.
 
-@itemize
-@item @option{rm}  ---  @command{rsh} with @command{mimencode}
 
-Connect to the remote host with @command{rsh} and use base64 encoding to
-transfer files between the machines.
+@table @asis
+@item @option{rsh}
+@cindex method rsh
+@cindex rsh method
 
-This requires the @command{mimencode} command that is part of the
-@command{metamail} packages. This may not be installed on all remote
-machines.
+Connect to the remote host with @command{rsh}.  Due to the unsecure
+connection it is recommended for very local host topology only.
 
+On operating systems which provide the command @command{remsh} instead
+of @command{rsh}, you can use the method @option{remsh}.  This is true
+for HP-UX or Cray UNICOS, for example.
 
-@item @option{sm}  ---  @command{ssh} with @command{mimencode}
 
-Connect to the remote host with @command{ssh} and use base64 encoding to
-transfer files between the machines.
+@item @option{ssh}
+@cindex method ssh
+@cindex ssh method
+
+Connect to the remote host with @command{ssh}.  This is identical to
+the previous option except that the @command{ssh} package is used,
+making the connection more secure.
 
-This is identical to the previous option except that the @command{ssh}
-package is used, making the connection more secure.
+There are also two variants, @option{ssh1} and @option{ssh2}, that
+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.)
 
-There are also two variants, @option{sm1} and @option{sm2} that use the
-@command{ssh1} and @command{ssh2} commands explicitly. If you don't know
-what these are, you do not need these options.
+Two other variants, @option{ssh1_old} and @option{ssh2_old}, use the
+@command{ssh1} and @command{ssh2} commands explicitly.  If you don't
+know what these are, you do not need these options.
 
 All the methods based on @command{ssh} have an additional kludgy
 feature: you can specify a host name which looks like @file{host#42}
@@ -636,129 +619,102 @@ means to connect to the given host but to also pass @code{-p 42} as
 arguments to the @command{ssh} command.
 
 
-@item @option{tm}  ---  @command{telnet} with @command{mimencode}
-
-Connect to the remote host with @command{telnet} and use base64 encoding
-to transfer files between the machines.
-
-This requires the @command{mimencode} command that is part of the
-@command{metamail} packages.
-
-
-@item @option{ru}  ---  @command{rsh} with @command{uuencode}
-
-Connect to the remote host with @command{rsh} and use the
-@command{uuencode} and @command{uudecode} commands to transfer files
-between the machines.
-
-
-@item @option{su}  ---  @command{ssh} with @command{uuencode}
-
-Connect to the remote host with @command{ssh} and use the
-@command{uuencode} and @command{uudecode} commands to transfer files
-between the machines.
-
-As with the @command{ssh} and base64 option (@option{sm}) above, this
-provides the @option{su1} and @option{su2} methods to explicitly
-select an ssh version.
-
-Note that this method does not invoke the @command{su} program, see
-below for methods which use that.
-
-This supports the @command{-p} kludge.
-
-
-@item @option{tu}  ---  @command{telnet} with @command{uuencode}
-
-Connect to the remote host with @command{telnet} and use the
-@command{uuencode} and @command{uudecode} commands to transfer files
-between the machines.
-
-
-@item @option{sum} --- @command{su} with @command{mimencode}
+@item @option{telnet}
+@cindex method telnet
+@cindex telnet method
 
-This method does not connect to a remote host at all, rather it uses the
-@command{su} program to allow you to edit files as another user.  Uses
-base64 encoding to transfer the file contents.
+Connect to the remote host with @command{telnet}.  This is as unsecure
+as the @option{rsh} method.
 
 
-@item @option{suu} --- @command{su} with @command{uuencode}
+@item @option{su}
+@cindex method su
+@cindex su method
 
-Like @option{sum}, this uses the @command{su} program to allow you to
-edit files on the local host as another user.  Uses @command{uuencode}
-and @command{uudecode} to transfer the file contents.
+This method does not connect to a remote host at all, rather it uses
+the @command{su} program to allow you to edit files as another user.
 
 
-@item @option{sudm} --- @command{sudo} with @command{mimencode}
+@item @option{sudo}
+@cindex method sudo
+@cindex sudo method
 
-This is similar to the @option{sum} method, but it uses @command{sudo}
+This is similar to the @option{su} method, but it uses @command{sudo}
 rather than @command{su} to become a different user.
 
 Note that @command{sudo} must be configured to allow you to start a
 shell as the user.  It would be nice if it was sufficient if
-@command{ls} and @command{mimencode} were allowed, but that is not easy
-to implement, so I haven't got around to it, yet.
-
-
-@item @option{sudu} --- @command{sudo} with @command{uuencode}
-
-This is similar to the @option{suu} method, but it uses @command{sudo}
-rather than @command{su} to become a different user.
+@command{ls} and @command{mimencode} were allowed, but that is not
+easy to implement, so I haven't got around to it, yet.
 
 
-@item @option{smx} --- @command{ssh} with @command{mimencode}
+@item @option{sshx}
+@cindex method sshx
+@cindex sshx method
 
-As you expect, this is similar to @option{sm}, only a little
-different.  Whereas @option{sm} opens a normal interactive shell on
-the remote host, this option uses @command{ssh -t -t HOST -l USER
-/bin/sh} tp open a connection.  This is useful for users where the
-normal login shell is set up to ask them a number of questions when
-logging in.  This procedure avoids these questions, and just gives
-@tramp{} a more-or-less `standard' login shell to work with.
+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
+where the normal login shell is set up to ask them a number of
+questions when logging in.  This procedure avoids these questions, and
+just gives @value{tramp} a more-or-less `standard' login shell to work
+with.
 
 Note that this procedure does not eliminate questions asked by
 @command{ssh} itself.  For example, @command{ssh} might ask ``Are you
 sure you want to continue connecting?'' if the host key of the remote
-host is not known.  Tramp does not know how to deal with such a
+host is not known.  @value{tramp} does not know how to deal with such a
 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.
+invoked from an @value{emacsname} 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 @value{tramp} mightily.
+For reasons unknown, some Windows ports for @command{ssh} require the
+doubled @samp{-t} option.
 
-This supports the @command{-p} kludge.
+This supports the @samp{-p} kludge.
 
 
-@item @option{km} --- @command{krlogin} with @command{mimencode}
+@item @option{krlogin}
+@cindex method krlogin
+@cindex km krlogin
+@cindex Kerberos (with krlogin method)
 
-This method is also similar to @option{sm}.  It only uses the
+This method is also similar to @option{ssh}.  It only uses the
 @command{krlogin -x} command to log in to the remote host.
 
 
-@item @option{plinku} --- @command{plink} with @command{uuencode}
+@item @option{plink}
+@cindex method plink
+@cindex plink method
 
 This method is mostly interesting for Windows users using the PuTTY
-implementation of SSH.  It uses @command{plink -ssh} to log in to the
+implementation of SSH.  It uses @samp{plink -ssh} to log in to the
 remote host.
 
+Additionally, the method @option{plink1} is provided, which calls
+@samp{plink -1 -ssh} in order to use SSH protocol version 1
+explicitly.
+
 CCC: Do we have to connect to the remote host once from the command
 line to accept the SSH key?  Maybe this can be made automatic?
 
-CCC: Does @command{plink} support the @command{-p} option?  Tramp
-will support that, anyway.
-
-@item @option{plinkm} --- @command{plink} with @command{mimencode}
+CCC: Does @command{plink} support the @samp{-p} option?  @value{tramp} will
+support that, anyway.
 
-Like @option{plinku}, but uses base64 encoding instead of uu encoding.
-
-@end itemize
+@end table
 
 
 
 @node External transfer methods
 @section External transfer methods
+@cindex methods, external transfer
+@cindex methods, out-of-band
+@cindex external transfer methods
+@cindex out-of-band methods
 
 The external transfer methods operate through multiple channels, using
 the remote shell connection for many actions while delegating file
@@ -767,10 +723,11 @@ transfers to an external transfer utility.
 This saves the overhead of encoding and decoding that multiplexing the
 transfer through the one connection has with the inline methods.
 
-If you want to use an external transfer method you @emph{must} be able
-to execute the transfer utility to copy files to and from the remote
+If you want to use an external transfer method you should be able to
+execute the transfer utility to copy files to and from the remote
 machine without any interaction.
 
+@cindex ssh-agent
 This means that you will need to use @command{ssh-agent} if you use the
 @command{scp} program for transfers, or maybe your version of
 @command{scp} accepts a password on the command line.@footnote{PuTTY's
@@ -778,20 +735,31 @@ This means that you will need to use @command{ssh-agent} if you use the
 If you use @command{rsync} via @command{ssh} then the same rule must
 apply to that connection.
 
-If you cannot get @command{scp} to run without asking for a password but
-would still like to use @command{ssh} to secure your connection, have a
-look at the @command{ssh} based inline methods.
+If you cannot get an external method to run without asking for a
+password you should consider @ref{Password caching}.
 
 
-@itemize
+@table @asis
 @item @option{rcp}  ---  @command{rsh} and @command{rcp}
+@cindex method rcp
+@cindex rcp method
+@cindex rcp (with rcp method)
+@cindex rsh (with rcp method)
 
 This method uses the @command{rsh} and @command{rcp} commands to connect
-to the remote machine and transfer files. This is probably the fastest
+to the remote machine and transfer files.  This is probably the fastest
 connection method available.
 
+The alternative method @option{remcp} uses the @command{remsh} and
+@command{rcp} commands.  It should be applied on machines where
+@command{remsh} is used instead of @command{rsh}.
+
 
 @item @option{scp}  ---  @command{ssh} and @command{scp}
+@cindex method scp
+@cindex scp method
+@cindex scp (with scp method)
+@cindex ssh (with scp method)
 
 Using @command{ssh} to connect to the remote host and @command{scp} to
 transfer files between the machines is the best method for securely
@@ -803,13 +771,28 @@ The cost of the cryptographic handshake at the start of an @command{scp}
 session can begin to absorb the advantage that the lack of encoding and
 decoding presents.
 
-All the @command{ssh} based methods support the kludgy @command{-p}
+There are also two variants, @option{scp1} and @option{scp2}, that
+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{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
+know what these are, you do not need these options.
+
+All the @command{ssh} based methods support the kludgy @samp{-p}
 feature where you can specify a port number to connect to in the host
-name.  For example, the host name @file{host#42} tells Tramp to
-specify @command{-p 42} in the argument list for @command{ssh}.
+name.  For example, the host name @file{host#42} tells @value{tramp} to
+specify @samp{-p 42} in the argument list for @command{ssh}.
 
 
 @item @option{rsync}  ---  @command{ssh} and @command{rsync}
+@cindex method rsync
+@cindex rsync method
+@cindex rsync (with rsync method)
+@cindex ssh (with rsync method)
 
 Using the @command{ssh} command to connect securely to the remote
 machine and the @command{rsync} command to transfer files is almost
@@ -821,40 +804,54 @@ the file exists only on one side of the connection.
 
 The @command{rsync} based method may be considerably faster than the
 @command{rcp} based methods when writing to the remote system. Reading
-files to the local machine is no faster than with a direct copy. 
+files to the local machine is no faster than with a direct copy.
 
-This method supports the @command{-p} hack.
+This method supports the @samp{-p} hack.
 
 
 @item @option{scpx} --- @command{ssh} and @command{scp}
-
-As you 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 @command{ssh -t -t HOST -l USER /bin/sh} to
-open a connection.  This is useful for users where the normal login
-shell is set up to ask them a number of questions when logging in.  This
-procedure avoids these questions, and just gives @tramp{} a more-or-less
-`standard' login shell to work with. 
+@cindex method scpx
+@cindex scpx method
+@cindex scp (with scpx method)
+@cindex ssh (with scpx method)
+
+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
+where the normal login shell is set up to ask them a number of
+questions when logging in.  This procedure avoids these questions, and
+just gives @value{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.
+invoked from an @value{emacsname} 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 @value{tramp} mightily.
 
-This method supports the @command{-p} hack.
+This method supports the @samp{-p} hack.
 
 
 @item @option{pscp} --- @command{plink} and @command{pscp}
+@cindex method pscp
+@cindex pscp method
+@cindex pscp (with pscp method)
+@cindex plink (with pscp method)
+@cindex PuTTY (with pscp method)
 
 This method is similar to @option{scp}, but it uses the
 @command{plink} command to connect to the remote host, and it uses
 @command{pscp} for transferring the files.  These programs are part
 of PuTTY, an SSH implementation for Windows.
 
-CCC: Does @command{plink} support the @command{-p} hack?
+CCC: Does @command{plink} support the @samp{-p} hack?
 
 
 @item @option{fcp} --- @command{fsh} and @command{fcp}
+@cindex method fcp
+@cindex fcp method
+@cindex fsh (with fcp method)
+@cindex fcp (with fcp method)
 
 This method is similar to @option{scp}, but it uses the @command{fsh}
 command to connect to the remote host, and it uses @command{fcp} for
@@ -865,14 +862,79 @@ for submitting several commands.  This avoids the startup overhead of
 is called).  Note, however, that you can also use one of the inline
 methods to achieve a similar effect.
 
-This method uses the command @command{fsh HOST -l USER /bin/sh -i} to
-establish the connection, it does not work to just say @command{fsh
-HOST -l USER}.
+This method uses the command @samp{fsh @var{host} -l @var{user}
+/bin/sh -i} to establish the connection, it does not work to just say
+@command{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.  @value{tramp}
+opens just one connection to the remote host and then keeps it open,
+anyway.
+
+
+@item @option{ftp}
+@cindex method ftp
+@cindex ftp method
+
+This is not a native @value{tramp} method. Instead of, it forwards all
+requests to @value{ftppackagename}.
+@ifset xemacs
+This works only for unified filenames, see @ref{Issues}.
+@end ifset
+
+
+@item @option{smb} --- @command{smbclient}
+@cindex method smb
+@cindex smb method
+
+This is another not natural @value{tramp} method.  It uses the
+@command{smbclient} command on different Unices in order to connect to
+an SMB server.  An SMB server might be a Samba (or CIFS) server on
+another UNIX host or, more interesting, a host running MS Windows.  So
+far, it is tested towards MS Windows NT, MS Windows 2000, and MS
+Windows XP.
+
+The first directory in the localname must be a share name on the remote
+host.  Remember, that the @code{$} character in which default shares
+usually end, must be written @code{$$} due to environment variable
+substitution in file names.  If no share name is given (i.e. remote
+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.
+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 @value{tramp} syntax has been extended: you can
+specify a user name which looks like @code{user%domain} (the real user
+name, then a percent sign, then the domain name).  So, to connect to
+the machine @code{melancholia} as user @code{daniel} of the domain
+@code{BIZARRE}, and edit @file{.emacs} in the home directory (share
+@code{daniel$}) I would specify the filename
+@file{@value{prefix}smb@value{postfixsinglehop}daniel%BIZARRE@@melancholia@value{postfix}/daniel$$/.emacs}.
+
+The domain name as well as the user name are optional.  If no user
+name is specified at all, the anonymous user (without password
+prompting) is assumed.  This is different from all other @value{tramp}
+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 @value{emacsname} 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 itemize
+@end table
 
 @node Multi-hop Methods
 @section Connecting to a remote host using multiple hops
+@cindex multi-hop methods
+@cindex methods, multi-hop
 
 Sometimes, the methods described before are not sufficient.  Sometimes,
 it is not possible to connect to a remote host using a simple command.
@@ -880,50 +942,48 @@ For example, if you are in a secured network, you might have to log in
 to a `bastion host' first before you can connect to the outside world.
 Of course, the target host may also require a bastion host.  The format
 of multi-hop filenames is slightly different than the format of normal
-@tramp{} methods.
+@value{tramp} methods.
 
-A multi-hop file name specifies a method, a number of hops, and a path
-name on the remote system.  The method specifies how the file is
-transferred through the inline connection.  The following two multi-hop
-methods are available:
-
-@itemize
-@item @option{multi} --- base64 encoding with @command{mimencode}
+@cindex method multi
+@cindex multi method
+A multi-hop file name specifies a method, a number of hops, and a
+localname (path name on the remote system).  The method name is always
+@option{multi}.
 
-The file is transferred through the connection in base64 encoding.  Uses
-the @command{mimencode} program for doing encoding and decoding, but
-uses an Emacs internal implementation on the local host if available.
+Each hop consists of a @dfn{hop method} specification, a user name and
+a host name.  The hop method can be an inline method only.  The
+following hop methods are (currently) available:
 
-@item @option{multiu} --- use commands @command{uuencode} and @command{uudecode}
-
-The file is transferred through the connection in `uu' encoding.  Uses
-the @command{uuencode} and @command{uudecode} programs for encoding and
-decoding, but uses a Lisp implementation for decoding on the local host
-if available.
-
-@end itemize
-
-Each hop consists of a @dfn{hop method} specification, a user name and a
-host name.  The following hop methods are (currently) available:
-
-@itemize
-@item @option{telnet}
+@table @option
+@item telnet
+@cindex hop method telnet
+@cindex telnet hop method
 
 Uses the well-known @command{telnet} program to connect to the host.
 Whereas user name and host name are supplied in the file name, the
 user is queried for the password.
 
-@item @option{rsh}
+@item rsh
+@cindex hop method rsh
+@cindex rsh hop method
 
 This uses @command{rsh} to connect to the host.  You do not need to
 enter a password unless @command{rsh} explicitly asks for it.
 
-@item @option{ssh}
+The variant @option{remsh} uses the @command{remsh} command.  It
+should be applied on machines where @command{remsh} is used instead of
+@command{rsh}.
+
+@item ssh
+@cindex hop method ssh
+@cindex ssh hop method
 
 This uses @command{ssh} to connect to the host.  You might have to enter
 a password or a pass phrase.
 
-@item @option{su}
+@item su
+@cindex hop method su
+@cindex su hop method
 
 This method does not actually contact a different host, but it allows
 you to become a different user on the host you're currently on.  This
@@ -934,47 +994,72 @@ remote host as a non-root user, then use an @option{su} hop to become
 root.  But @option{su} need not be the last hop in a sequence, you could
 also use it somewhere in the middle, if the need arises.
 
-Even though you @emph{must} specify both user and host with a
+Even though you @emph{must} specify both user and host with an
 @option{su} hop, the host name is ignored and only the user name is
 used.
 
-@item @option{sudo}
+@item sudo
+@cindex hop method sudo
+@cindex sudo hop method
 
 This is similar to the @option{su} hop, except that it uses
 @command{sudo} rather than @command{su} to become a different user.
 
-@end itemize
+@end table
 
-Some people might wish to use port forwarding with @code{ssh} or maybe
-they have to use a nonstandard port.  This can be accomplished by
-putting a stanza in @file{~/.ssh/config} for the account which specifies
-a different port number for a certain host name.  But it can also be
-accomplished within Tramp, by adding a multi-hop method.  For example:
+Some people might wish to use port forwarding with @command{ssh} or
+maybe they have to use a nonstandard port.  This can be accomplished
+by putting a stanza in @file{~/.ssh/config} for the account which
+specifies a different port number for a certain host name.  But it can
+also be accomplished within @value{tramp}, by adding a multi-hop method.
+For example:
 
 @lisp
-(add-to-list 'tramp-multi-connection-function-alist
-             '("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n"))
+(add-to-list
+ 'tramp-multi-connection-function-alist
+ '("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n"))
 @end lisp
 
-Now you can use a @code{sshf} hop which connects to port 4400 instead of
+Now you can use an @option{sshf} hop which connects to port 4400 instead of
 the standard port.
 
 
 @node Default Method
 @section Selecting a default method
+@cindex default method
 
+@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
-choice. This variable controls which method will be used when a method
-is not specified in the @tramp{} file path.  For example:
+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 @value{tramp} file name.  For example:
+
+@lisp
+(setq tramp-default-method "ssh")
+@end lisp
+
+@vindex tramp-default-method-alist
+You can also specify different methods for certain user/host
+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
+specifies to use the @option{su} method for the user @samp{root} on
+the machine @samp{localhost}.
 
 @lisp
-(setq tramp-default-method "scp")
+(add-to-list 'tramp-default-method-alist '("" "john" "ssh"))
+(add-to-list 'tramp-default-method-alist '("lily" "" "rsync"))
+(add-to-list 'tramp-default-method-alist
+             '("\\`localhost\\'" "\\`root\\'" "su"))
 @end lisp
 
+@noindent
+See the documentation for the variable
+@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
-many remote machines where you cannot log in without a password.
+methods, giving better performance.
 
 @xref{Inline methods}.
 @xref{External transfer methods}.
@@ -984,19 +1069,63 @@ Another consideration with the selection of transfer methods is the
 environment you will use them in and, especially when used over the
 Internet, the security implications of your preferred method.
 
-The @command{rsh} and @command{telnet} methods send your password as
-plain text as you log in to the remote machine, as well as transferring
-the files in such a way that the content can easily be read from other
-machines.
+The @option{rsh} and @option{telnet} methods send your password as
+plain text as you log in to the remote machine, as well as
+transferring the files in such a way that the content can easily be
+read from other machines.
 
 If you need to connect to remote systems that are accessible from the
-Internet, you should give serious thought to using @command{ssh} based
+Internet, you should give serious thought to using @option{ssh} based
 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.
+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 @command{ssh}.  So I suggest that you use the @option{ssh}
+method.  So, type @kbd{C-x C-f
+@value{prefix}ssh@value{postfixsinglehop}root@@otherhost@value{postfix}/etc/motd
+@key{RET}} to edit the @file{/etc/motd} file on the other host.
+
+If you can't use @option{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 @option{plink} method which uses the PuTTY
+implementation of @command{ssh}.  Or you use Kerberos and thus like
+@option{krlogin}.
+
+For the special case of editing files on the local host as another
+user, see the @option{su} or @option{sudo} methods.  They offer
+shortened syntax for the @samp{root} account, like
+@file{@value{prefix}su@value{postfixsinglehop}@value{postfix}/etc/motd}.
+
+People who edit large files may want to consider @option{scp} instead
+of @option{ssh}, or @option{pscp} instead of @option{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.
+
 
 @node Customizing Methods
 @section Using Non-Standard Methods
+@cindex customizing methods
+@cindex using non-standard methods
+@cindex create your own methods
 
 There is a variable @code{tramp-methods} which you can change if the
 predefined methods don't seem right.
@@ -1005,10 +1134,173 @@ For the time being, I'll refer you to the Lisp documentation of that
 variable, accessible with @kbd{C-h v tramp-methods @key{RET}}.
 
 
+@node Customizing Completion
+@section Selecting config files for user/host name completion
+@cindex customizing completion
+@cindex selecting config files
+@vindex tramp-completion-function-alist
+
+The variable @code{tramp-completion-function-alist} is intended to
+customize which files are taken into account for user and host name
+completion (@pxref{Filename completion}).  For every method, it keeps
+a set of configuration files, accompanied by a Lisp function able to
+parse that file.  Entries in @code{tramp-completion-function-alist}
+have the form (@var{method} @var{pair1} @var{pair2} ...).
+
+Each @var{pair} is composed of (@var{function} @var{file}).
+@var{function} is responsible to extract user names and host names
+from @var{file} for completion.  There are two functions which access
+this variable:
+
+@defun tramp-get-completion-function method
+This function returns the list of completion functions for @var{method}.
+
+Example:
+@example
+(tramp-get-completion-function "rsh")
+
+     @result{} ((tramp-parse-rhosts "/etc/hosts.equiv")
+         (tramp-parse-rhosts "~/.rhosts"))
+@end example
+@end defun
+
+@defun tramp-set-completion-function method function-list
+This function sets @var{function-list} as list of completion functions
+for @var{method}.
+
+Example:
+@example
+(tramp-set-completion-function "ssh"
+ '((tramp-parse-sconfig "/etc/ssh_config")
+   (tramp-parse-sconfig "~/.ssh/config")))
+
+     @result{} ((tramp-parse-sconfig "/etc/ssh_config")
+         (tramp-parse-sconfig "~/.ssh/config"))
+@end example
+@end defun
+
+The following predefined functions parsing configuration files exist:
+
+@table @asis
+@item @code{tramp-parse-rhosts}
+@findex tramp-parse-rhosts
+
+This function parses files which are syntactical equivalent to
+@file{~/.rhosts}.  It returns both host names and user names, if
+specified.
+
+@item @code{tramp-parse-shosts}
+@findex tramp-parse-shosts
+
+This function parses files which are syntactical equivalent to
+@file{~/.ssh/known_hosts}.  Since there are no user names specified
+in such files, it can return host names only.
+
+@item @code{tramp-parse-sconfig}
+@findex tramp-parse-shosts
+
+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_@var{portnumber}_@var{host-name}.pub}.  User names
+are always @code{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{@var{host-name}.@var{algorithm}.pub}.  User names are always @code{nil}.
+
+@item @code{tramp-parse-hosts}
+@findex tramp-parse-hosts
+
+A function dedicated to @file{/etc/hosts} style files.  It returns
+host names only.
+
+@item @code{tramp-parse-passwd}
+@findex tramp-parse-passwd
+
+A function which parses @file{/etc/passwd} like files.  Obviously, it
+can return user names only.
+
+@item @code{tramp-parse-netrc}
+@findex tramp-parse-netrc
+
+Finally, a function which parses @file{~/.netrc} like files.
+@end table
+
+If you want to keep your own data in a file, with your own structure,
+you might provide such a function as well.  This function must meet
+the following conventions:
+
+@defun my-tramp-parse file
+@var{file} must be either a file name on your host, or @code{nil}. The
+function must return a list of (@var{user} @var{host}), which are
+taken as candidates for user and host name completion.
+
+Example:
+@example
+(my-tramp-parse "~/.my-tramp-hosts")
+
+     @result{} ((nil "toto") ("daniel" "melancholia"))
+@end 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 chosen method does not support access without password prompt
+through own configuration.
+
+By default, @value{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, independently 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{emacsname} 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 @value{tramp}.
+@ifset installchapter
+If you don't use No Gnus, you can take password.el from the @value{tramp}
+@file{contrib} directory, see @ref{Installation parameters}.
+@end ifset
+It will be activated mandatory once No Gnus has found its way into
+@value{emacsname}.
+
+
 @node Remote Programs
-@section How @tramp{} finds and uses programs on the remote machine.
+@section How @value{tramp} finds and uses programs on the remote machine.
 
-@tramp{} depends on a number of programs on the remote host in order to
+@value{tramp} depends on a number of programs on the remote host in order to
 function, including @command{ls}, @command{test}, @command{find} and
 @command{cat}.
 
@@ -1021,7 +1313,8 @@ Certain other tools, such as @command{perl} (or @command{perl5}) and
 available, they are used to improve the performance and accuracy of
 remote file access.
 
-When @tramp{} connects to the remote machine, it searches for the
+@vindex tramp-remote-path
+When @value{tramp} connects to the remote machine, it searches for the
 programs that it can use. The variable @var{tramp-remote-path} controls
 the directories searched on the remote machine.
 
@@ -1030,268 +1323,641 @@ machines. It is possible, however, that your local (or remote ;) system
 administrator has put the tools you want in some obscure local
 directory.
 
-In this case, you can still use them with @tramp{}. You simply need to
+In this case, you can still use them with @value{tramp}. You simply need to
 add code to your @file{.emacs} to add the directory to the remote path.
-This will then be searched by @tramp{} when you connect and the software
+This will then be searched by @value{tramp} when you connect and the software
 found.
 
 To add a directory to the remote search path, you could use code such
 as:
 
-@example
-(require 'tramp)                @i{; @tramp{} must be loaded before this}
-                                @i{; happens.}
+@lisp
+@i{;; We load @value{tramp} to define the variable.}
+(require 'tramp)
+@i{;; We have @command{perl} in "/usr/local/perl/bin"}
+(add-to-list 'tramp-remote-path "/usr/local/perl/bin")
+@end lisp
 
-@i{; We have @command{perl} in "/usr/local/perl"}
-(add-to-list 'tramp-remote-path "/usr/local/perl")
-@end example
 
 @node Remote shell setup
 @comment  node-name,  next,  previous,  up
 @section Remote shell setup hints
+@cindex remote shell setup
+@cindex @file{.profile} file
+@cindex @file{.login} file
+@cindex shell init files
 
-As explained in the @ref{Overview} section, @tramp{} connects to the
+As explained in the @ref{Overview} section, @value{tramp} connects to the
 remote host and talks to the shell it finds there.  Of course, when you
 log in, the shell executes its init files.  Suppose your init file
-requires you to enter the birthdate of your mother; clearly @tramp{}
+requires you to enter the birth date of your mother; clearly @value{tramp}
 does not know this and hence fails to log you in to that host.
 
 There are different possible strategies for pursuing this problem.  One
-strategy is to enable @tramp{} to deal with all possible situations.
+strategy is to enable @value{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 @value{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{}.
+setup before you can begin to use @value{tramp}.
 
-The package, therefore, pursues a combined approach.  It tries to figure
-out some of the more common setups, and only requires you to avoid
-really exotic stuff.  For example, it looks through a list of
+The package, therefore, pursues a combined approach.  It tries to
+figure out some of the more common setups, and only requires you to
+avoid really exotic stuff.  For example, it looks through a list of
 directories to find some programs on the remote host.  And also, it
-knows that it is not obvious how to check whether a file exist, and
-therefore it tries different possibilities.  (On some hosts and shells,
-the command @code{test -e} does the trick, on some hosts the shell
-builtin doesn't work but the program @code{/usr/bin/test -e} or
-@code{/bin/test -e} works.  And on still other hosts, @code{ls -d} is
-the right way to do this.)
-
-Below you find a discussion of a few things that @tramp{} does not deal
+knows that it is not obvious how to check whether a file exists, and
+therefore it tries different possibilities.  (On some hosts and
+shells, the command @command{test -e} does the trick, on some hosts
+the shell builtin doesn't work but the program @command{/usr/bin/test
+-e} or @command{/bin/test -e} works.  And on still other hosts,
+@command{ls -d} is the right way to do this.)
+
+Below you find a discussion of a few things that @value{tramp} does not deal
 with, and that you therefore have to set up correctly.
 
-@itemize
-@item @code{shell-prompt-pattern}
-
+@table @asis
+@item @var{shell-prompt-pattern}
 @vindex shell-prompt-pattern
-After logging in to the remote host, @tramp{} has to wait for the remote
+
+After logging in to the remote host, @value{tramp} has to wait for the remote
 shell startup to finish before it can send commands to the remote
 shell.  The strategy here is to wait for the shell prompt.  In order to
 recognize the shell prompt, the variable @code{shell-prompt-pattern} has
 to be set correctly to recognize the shell prompt on the remote host.
 
-Note that Tramp requires the match for @code{shell-prompt-pattern} to
-be at the end of the buffer.  Many people have something like the
+Note that @value{tramp} requires the match for @code{shell-prompt-pattern}
+to be at the end of the buffer.  Many people have something like the
 following as the value for the variable: @code{"^[^>$][>$] *"}.  Now
-suppose your shell prompt is @code{a <b> c $ }.  In this case, Tramp
-recognizes the @code{>} character as the end of the prompt, but it is
-not at the end of the buffer.
+suppose your shell prompt is @code{a <b> c $ }.  In this case,
+@value{tramp} recognizes the @code{>} character as the end of the prompt,
+but it is not at the end of the buffer.
+
+@item @var{tramp-shell-prompt-pattern}
+@vindex tramp-shell-prompt-pattern
+
+This regular expression is used by @value{tramp} in the same way as
+@code{shell-prompt-pattern}, to match prompts from the remote shell.
+This second variable exists because the prompt from the remote shell
+might be different from the prompt from a local shell --- after all,
+the whole point of @value{tramp} is to log in to remote hosts as a
+different user.  The default value of
+@code{tramp-shell-prompt-pattern} is the same as the default value of
+@code{shell-prompt-pattern}, which is reported to work well in many
+circumstances.
+
+@item @command{tset} and other questions
+@cindex Unix command tset
+@cindex tset Unix command
+
+Some people invoke the @command{tset} program from their shell startup
+scripts which asks the user about the terminal type of the shell.
+Maybe some shells ask other questions when they are started.  @value{tramp}
+does not know how to answer these questions.  There are two approaches
+for dealing with this problem.  One approach is to take care that the
+shell does not ask any questions when invoked from @value{tramp}.  You can
+do this by checking the @code{TERM} environment variable, it will be
+set to @code{dumb} when connecting.
 
-@item @code{tset} and other questions
+@vindex tramp-terminal-type
+The variable @code{tramp-terminal-type} can be used to change this value
+to @code{dumb}.
 
-Some people invoke the @code{tset} program from their shell startup
-scripts which asks the user about the terminal type of the shell.  Maybe
-some shells ask other questions when they are started.  @tramp{} does
-not know how to answer these questions.  (A facility for enabling
-@tramp{} to answer these questions is planned for some future version,
-but don't hold your breath.)
+The other approach is to teach @value{tramp} about these questions.  See
+the variables @code{tramp-actions-before-shell} and
+@code{tramp-multi-actions} (for multi-hop connections).
 
-Therefore, you should take care that the shell does not ask any
-questions when invoked from @tramp{}.  You can do this by checking the
-@code{TERM} environment variable, it will be set to @code{dumb} when
-connecting.
 
-@vindex tramp-terminal-type
-The variable @code{tramp-terminal-type} can be used to change this value
-@code{dumb}.
+@item Environment variables named like users in @file{.profile}
 
-@end itemize
+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 @value{tramp} user!
+
+
+@item Non-Bourne commands in @file{.profile}
+
+After logging in to the remote host, @value{tramp} issues the command
+@command{exec /bin/sh}.  (Actually, the command is slightly
+different.)  When @command{/bin/sh} is executed, it reads some init
+files, such as @file{~/.shrc} or @file{~/.profile}.
+
+Now, some people have a login shell which is not @code{/bin/sh} but a
+Bourne-ish shell such as bash or ksh.  Some of these people might put
+their shell setup into the files @file{~/.shrc} or @file{~/.profile}.
+This way, it is possible for non-Bourne constructs to end up in those
+files.  Then, @command{exec /bin/sh} might cause the Bourne shell to
+barf on those constructs.
+
+As an example, imagine somebody putting @command{export FOO=bar} into
+the file @file{~/.profile}.  The standard Bourne shell does not
+understand this syntax and will emit a syntax error when it reaches
+this line.
+
+Another example is the tilde (@code{~}) character, say when adding
+@file{~/bin} to @code{$PATH}.  Many Bourne shells will not expand this
+character, and since there is usually no directory whose name consists
+of the single character tilde, strange things will happen.
+
+What can you do about this?
+
+Well, one possibility is to make sure that everything in @file{~/.shrc}
+and @file{~/.profile} on all remote hosts is Bourne-compatible.  In the
+above example, instead of @command{export FOO=bar}, you might use
+@command{FOO=bar; export FOO} instead.
+
+The other possibility is to put your non-Bourne shell setup into some
+other files.  For example, bash reads the file @file{~/.bash_profile}
+instead of @file{~/.profile}, if the former exists.  So bash
+aficionados just rename their @file{~/.profile} to
+@file{~/.bash_profile} on all remote hosts, and Bob's your uncle.
+
+The @value{tramp} developers would like to circumvent this problem, so
+if you have an idea about it, please tell us.  However, we are afraid
+it is not that simple: before saying @command{exec /bin/sh},
+@value{tramp} does not know which kind of shell it might be talking
+to.  It could be a Bourne-ish shell like ksh or bash, or it could be a
+csh derivative like tcsh, or it could be zsh, or even rc.  If the
+shell is Bourne-ish already, then it might be prudent to omit the
+@command{exec /bin/sh} step.  But how to find out if the shell is
+Bourne-ish?
+
+@end table
+
+
+@node Auto-save and Backup
+@section Auto-save and Backup configuration
+@cindex auto-save
+@cindex backup
+@ifset emacs
+@vindex backup-directory-alist
+@end ifset
+@ifset xemacs
+@vindex bkup-backup-directory-info
+@end ifset
+
+Normally, @value{emacsname} writes backup files to the same directory
+as the original files, but this behavior can be changed via the
+variable
+@ifset emacs
+@code{backup-directory-alist}.
+@end ifset
+@ifset xemacs
+@code{bkup-backup-directory-info}.
+@end ifset
+In connection with @value{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{@value{prefix}su@value{postfixsinglehop}root@@localhost@value{postfix}/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
+@ifset emacs
+@code{backup-directory-alist}
+@end ifset
+@ifset xemacs
+@code{bkup-backup-directory-info}
+@end ifset
+is @code{nil} (the default), such problems do not occur.
+
+Therefore, it is useful to set special values for @value{tramp}
+files.  For example, the following statement effectively `turns off'
+the effect of
+@ifset emacs
+@code{backup-directory-alist}
+@end ifset
+@ifset xemacs
+@code{bkup-backup-directory-info}
+@end ifset
+for @value{tramp} files:
+
+@ifset emacs
+@lisp
+(add-to-list 'backup-directory-alist
+             (cons tramp-file-name-regexp nil))
+@end lisp
+@end ifset
+@ifset xemacs
+@lisp
+(require 'backup-dir)
+(add-to-list 'bkup-backup-directory-info
+             (list tramp-file-name-regexp ""))
+@end lisp
+@end ifset
+
+Another possibility is to use the @value{tramp} variable
+@ifset emacs
+@code{tramp-backup-directory-alist}.
+@end ifset
+@ifset xemacs
+@code{tramp-bkup-backup-directory-info}.
+@end ifset
+This variable has the same meaning like
+@ifset emacs
+@code{backup-directory-alist}.
+@end ifset
+@ifset xemacs
+@code{bkup-backup-directory-info}.
+@end ifset
+If a @value{tramp} file is backed up, and DIRECTORY is an absolute
+local file name, DIRECTORY is prepended with the @value{tramp} file
+name prefix of the file to be backed up.
+
+@noindent
+Example:
+
+@ifset emacs
+@lisp
+(add-to-list 'backup-directory-alist
+             (cons "." "~/.emacs.d/backups/"))
+(setq tramp-backup-directory-alist backup-directory-alist)
+@end lisp
+@end ifset
+@ifset xemacs
+@lisp
+(require 'backup-dir)
+(add-to-list 'bkup-backup-directory-info
+             (list "." "~/.emacs.d/backups/" 'full-path))
+(setq tramp-bkup-backup-directory-info bkup-backup-directory-info)
+@end lisp
+@end ifset
+
+@noindent
+The backup file name of
+@file{@value{prefix}su@value{postfixsinglehop}root@@localhost@value{postfix}/etc/secretfile}
+would be
+@ifset emacs
+@file{@value{prefix}su@value{postfixsinglehop}root@@localhost@value{postfix}~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile~}
+@end ifset
+@ifset xemacs
+@file{@value{prefix}su@value{postfixsinglehop}root@@localhost@value{postfix}~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}
+@end ifset
+
+The same problem can happen with auto-saving files.
+@ifset emacs
+Since @value{emacsname} 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 @value{tramp} files to the local temporary directory.
+
+On some versions of @value{emacsname}, namely the version built for
+Debian GNU/Linux, the variable @code{auto-save-file-name-transforms}
+contains the directory where @value{emacsname} 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 @code{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{auto-save-directory}
+to a proper value.
+@end ifset
 
 
 @node Windows setup hints
 @section Issues with Cygwin ssh
+@cindex Cygwin, issues
 
 This section needs a lot of work!  Please help.
 
-If you use the Cygwin installation of ssh (you have to explicitly select
-it in the installer), then it should work out of the box to just select
-@code{smx} as the connection method.  You can find information about
-setting up Cygwin in their FAQ at @uref{http://cygwin.com/faq/}.
+@cindex method sshx with Cygwin
+@cindex sshx method with Cygwin
+The recent Cygwin installation of @command{ssh} works only with a
+Cygwinized @value{emacsname}.  You can check it by typing @kbd{M-x
+eshell}, and starting @kbd{ssh test.machine}.  The problem is evident
+if you see a message like this:
+
+@example
+Pseudo-terminal will not be allocated because stdin is not a terminal.
+@end example
+
+Older @command{ssh} versions of Cygwin are told to cooperate with
+@value{tramp} selecting @option{sshx} as the connection method.  You
+can find information about 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 @option{scpx} connection method, then you might
+have the problem that @value{emacsname} calls @command{scp} with a
+Windows filename such as @code{c:/foo}.  The Cygwin version of
+@command{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 @option{scp}
+which converts the Windows filename to a Cygwinized filename.
+
+@cindex Cygwin and ssh-agent
+@cindex SSH_AUTH_SOCK and @value{emacsname} on Windows
+If you want to use either @option{ssh} based method on Windows, then
+you might encounter problems with @command{ssh-agent}.  Using this
+program, you can avoid typing the pass-phrase every time you log in.
+However, if you start @value{emacsname} from a desktop shortcut, then
+the environment variable @code{SSH_AUTH_SOCK} is not set and so
+@value{emacsname} and thus @value{tramp} and thus @command{ssh} and
+@command{scp} started from @value{tramp} cannot communicate with
+@command{ssh-agent}.  It works better to start @value{emacsname} from
+the shell.
+
+If anyone knows how to start @command{ssh-agent} under Windows in such a
+way that desktop shortcuts can profit, please holler.  I don't really
+know anything at all about Windows@dots{}
 
 
 @node Usage
-@chapter Using @tramp
+@chapter Using @value{tramp}
+@cindex using @value{tramp}
 
-Once you have installed @tramp{} it will operate fairly transparently. You
+Once you have installed @value{tramp} it will operate fairly transparently. You
 will be able to access files on any remote machine that you can log in
 to as though they were local.
 
-Files are specified to @tramp{} using a formalized syntax specifying the
-details of the system to connect to. This is similar to the syntax used
-by the @command{EFS} and @command{ange-ftp} packages.
-
+Files are specified to @value{tramp} using a formalized syntax specifying the
+details of the system to connect to.  This is similar to the syntax used
+by the @value{ftppackagename} package.
+
+@cindex type-ahead
+Something that might happen which surprises you is that
+@value{emacsname} remembers all your keystrokes, so if you see a
+password prompt from @value{emacsname}, say, and hit @kbd{@key{RET}}
+twice instead of once, then the second keystroke will be processed by
+@value{emacsname} after @value{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.
-* Multi-hop filename syntax::   Multi-hop filename conventions
-* Dired::                       Dired and filename completion.
+* Filename Syntax::             @value{tramp} filename conventions.
+* Multi-hop filename syntax::   Multi-hop filename conventions.
+* Filename completion::         Filename completion.
+* Dired::                       Dired.
+* Compilation::                 Compile remote files.
 @end menu
 
 
 @node Filename Syntax
-@section @tramp{} filename conventions
+@section @value{tramp} filename conventions
+@cindex filename syntax
+@cindex filename examples
 
-To access the file <path> on the remote machine <machine> you would
-specify the filename @file{/[<machine>]<path>}.  (The square brackets
-are part of the file name.)  This will connect to <machine> and transfer
-the file using the default method.  @xref{Default Method}.
+To access the file @var{localname} on the remote machine @var{machine} you
+would specify the filename
+@file{@value{prefix}@var{machine}@value{postfix}@var{localname}}.
+This will connect to @var{machine} and transfer the file using the
+default method.  @xref{Default Method}.
 
-Some examples of @tramp{} filenames are:
+Some examples of @value{tramp} filenames are shown below.
 
 @table @file
-@item /[melancholia].emacs
+@item @value{prefix}melancholia@value{postfix}.emacs
 Edit the file @file{.emacs} in your home directory on the machine
 @code{melancholia}.
 
-@item /[melancholia.danann.net].emacs
+@item @value{prefix}melancholia.danann.net@value{postfix}.emacs
 This edits the same file, using the fully qualified domain name of
 the machine.
 
-@item /[melancholia]~/.emacs
+@item @value{prefix}melancholia@value{postfix}~/.emacs
 This also edits the same file --- the @file{~} is expanded to your
 home directory on the remote machine, just like it is locally.
 
-@item /[melancholia]~daniel/.emacs
+@item @value{prefix}melancholia@value{postfix}~daniel/.emacs
 This edits the file @file{.emacs} in the home directory of the user
 @code{daniel} on the machine @code{melancholia}. The @file{~<user>}
 construct is expanded to the home directory of that user on the remote
 machine.
 
-@item /[melancholia]/etc/squid.conf
+@item @value{prefix}melancholia@value{postfix}/etc/squid.conf
 This edits the file @file{/etc/squid.conf} on the machine
 @code{melancholia}.
 
 @end table
 
-
-Unless you specify a different name to use, @tramp{} will use the current
-local user name as the remote user name to log in with. If you need to
-log in as a different user, you can specify the user name as part of the
-filename.
+Unless you specify a different name to use, @value{tramp} will use the
+current local user name as the remote user name to log in with. If you
+need to log in as a different user, you can specify the user name as
+part of the filename.
 
 To log in to the remote machine as a specific user, you use the syntax
-@file{/[<user>@@<machine>]/path/to.file}.  That means that connecting to
-@code{melancholia} as @code{daniel} and editing @file{.emacs} in your
-home directory you would specify @file{/[daniel@@melancholia].emacs}.
-
+@file{@value{prefix}@var{user}@@@var{machine}@value{postfix}/@var{path/to.file}}.
+That means that connecting to @code{melancholia} as @code{daniel} and
+editing @file{.emacs} in your home directory you would specify
+@file{@value{prefix}daniel@@melancholia@value{postfix}.emacs}.
 
 It is also possible to specify other file transfer methods
-(@pxref{Default Method}) as part of the filename.  This is done by
-replacing the initial @file{/[} with @file{/[<method>/}.  (Note the
-trailing slash!)  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} in my
-home directory I would specify the filename
-@file{/[su/daniel@@melancholia].emacs}.
+(@pxref{Default Method}) as part of the filename.
+@ifset emacs
+This is done by putting the method before the user and host name, as
+in
+@file{@value{prefix}@var{method}@value{postfixsinglehop}}
+(Note the trailing colon).
+@end ifset
+@ifset xemacs
+This is done by replacing the initial
+@file{@value{prefix}} with
+@file{@value{prefix}<method>@value{postfixsinglehop}}.
+(Note the trailing slash!).
+@end ifset
+The user, machine and file specification remain the same.
+
+So, to connect to the machine @code{melancholia} as @code{daniel},
+using the @option{ssh} method to transfer files, and edit @file{.emacs}
+in my home directory I would specify the filename
+@file{@value{prefix}ssh@value{postfixsinglehop}daniel@@melancholia@value{postfix}.emacs}.
 
 
 @node Multi-hop filename syntax
 @section Multi-hop filename conventions
+@cindex filename syntax for multi-hop files
+@cindex multi-hop filename syntax
 
 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:
+than the syntax of other @value{tramp} file names.  Here's an example
+multi-hop file name:
 
-@file{/[multi/rsh:out@@gate/telnet:kai@@real.host]/path/to.file}
+@example
+@value{prefix}multi@value{postfixsinglehop}rsh@value{postfixmultihop}out@@gate@value{postfixsinglehop}telnet@value{postfixmultihop}kai@@real.host@value{postfix}/path/to.file
+@end example
 
 This is quite a mouthful.  So let's go through it step by step.  The
-file name consists of three parts, separated by slashes and square
-brackets.  The first part is @file{/[multi}, the method specification.
-The second part is @file{rsh:out@@gate/telnet:kai@@real.host} and
-specifies the hops.  (Yes, the second part may contain even more
-slashes, so that's why this file name has more than two colons in it.)
-The final part is @file{/path/to.file} and specifies the file name on
-the remote host.
-
-The first part and the final part should be clear.  @ref{Multi-hop
+file name consists of three parts.
+@ifset emacs
+The parts are separated by colons
+@end ifset
+@ifset xemacs
+The parts are separated by slashes and square brackets.
+@end ifset
+The first part is @file{@value{prefix}multi}, the method
+specification.  The second part is
+@file{rsh@value{postfixmultihop}out@@gate@value{postfixsinglehop}telnet@value{postfixmultihop}kai@@real.host}
+and specifies the hops.  The final part is @file{/path/to.file} and
+specifies the file name on the remote host.
+
+The first part and the final part should be clear.  See @ref{Multi-hop
 Methods}, for a list of alternatives for the method specification.
 
-The second part can be subdivided again into components, so-called hops.
-In the above file name, there are two hops, @file{rsh:out@@gate} and
-@file{telnet:kai@@real.host}.
+The second part can be subdivided again into components, so-called
+hops.  In the above file name, there are two hops,
+@file{rsh@value{postfixmultihop}out@@gate} and
+@file{telnet@value{postfixmultihop}kai@@real.host}.
 
 Each hop can @emph{again} be subdivided into (three) components, the
 @dfn{hop method}, the @dfn{user name} and the @dfn{host name}.  The
 meaning of the second and third component should be clear, and the hop
 method says what program to use to perform that hop.
 
-The first hop, @file{rsh:out@@gate}, says to use @command{rsh} to log in
-as user @code{out} to the host @code{gate}.  Starting at that host, the
-second hop, @file{telnet:kai@@real.host}, says to use @command{telnet}
-to log in as user @code{kai} to host @code{real.host}.
+The first hop, @file{rsh@value{postfixmultihop}out@@gate},
+says to use @command{rsh} to log in as user @code{out} to the host
+@code{gate}.  Starting at that host, the second hop,
+@file{telnet@value{postfixmultihop}kai@@real.host}, says to
+use @command{telnet} to log in as user @code{kai} to host
+@code{real.host}.
 
-@xref{Multi-hop Methods}, for a list of possible hop method values.  The
-variable @var{tramp-multi-connection-function-alist} contains the list of
-possible hop methods and information on how to execute them, should you
-want to add your own.
+@xref{Multi-hop Methods}, for a list of possible hop method values.
+The variable @code{tramp-multi-connection-function-alist} contains the
+list of possible hop methods and information on how to execute them,
+should you want to add your own.
 
 
-@node Dired
-@section Dired and filename completion
+@node Filename completion
+@section Filename completion
+@cindex filename completion
 
-@tramp{} works transparently with dired, enabling you to use this powerful
-file management tool to manage files on any machine you have access to
-over the Internet.
+Filename completion works with @value{tramp} for completion of method
+names, of user names and of machine names (except multi-hop methods)
+as well as for completion of file names on remote machines.
+@ifset emacs
+In order to enable this, Partial Completion mode must be set on.
+@ifinfo
+@xref{Completion Options, , , @value{emacsdir}}.
+@end ifinfo
+@end ifset
 
-Filename completion also works with @tramp{} for files on remote machines
-although there is no completion for user names or machine names at this
-stage.
+If you, for example, type @kbd{C-x C-f @value{prefix}t
+@key{TAB}}, @value{tramp} might give you as result the choice for
+
+@example
+@ifset emacs
+@value{prefixsinglehop}telnet@value{postfixsinglehop}                             tmp/
+@value{prefixsinglehop}toto@value{postfix}
+@end ifset
+@ifset xemacs
+@value{prefixsinglehop}telnet@value{postfixsinglehop}                             @value{prefixsinglehop}toto@value{postfix}
+@end ifset
+@end example
+
+@samp{@value{prefixsinglehop}telnet@value{postfixsinglehop}}
+is a possible completion for the respective method,
+@ifset emacs
+@samp{tmp/} stands for the directory @file{/tmp} on your local
+machine,
+@end ifset
+and @samp{@value{prefixsinglehop}toto@value{postfix}}
+might be a host @value{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
+@samp{@value{prefix}telnet@value{postfixsinglehop}}.
+Next @kbd{@key{TAB}} brings you all machine names @value{tramp} detects in
+your @file{/etc/hosts} file, let's say
+
+@example
+@value{prefixsinglehop}telnet@value{postfixsinglehop}127.0.0.1@value{postfix}             @value{prefixsinglehop}telnet@value{postfixsinglehop}192.168.0.1@value{postfix}
+@value{prefixsinglehop}telnet@value{postfixsinglehop}localhost@value{postfix}             @value{prefixsinglehop}telnet@value{postfixsinglehop}melancholia.danann.net@value{postfix}
+@value{prefixsinglehop}telnet@value{postfixsinglehop}melancholia@value{postfix}
+@end example
+
+Now you can choose the desired machine, and you can continue to
+complete file names on that machine.
 
 As filename completion needs to fetch the listing of files from the
-remote machine, this feature is sometimes fairly slow. As @tramp{} does not
-yet cache the results of directory listing, there is no gain in
-performance the second time you complete filenames.
+remote machine, this feature is sometimes fairly slow.  As @value{tramp}
+does not yet cache the results of directory listing, there is no gain
+in performance the second time you complete filenames.
+
+If the configuration files (@pxref{Customizing Completion}), which
+@value{tramp} uses for analysis of completion, offer user names, those user
+names will be taken into account as well.
+
+
+@node Dired
+@section Dired
+@cindex dired
+
+@value{tramp} works transparently with dired, enabling you to use this powerful
+file management tool to manage files on any machine you have access to
+over the Internet.
 
 If you need to browse a directory tree, Dired is a better choice, at
-present, than filename completion. Dired has its own cache mechanism
+present, than filename completion.  Dired has its own cache mechanism
 and will only fetch the directory listing once.
 
 
+@node Compilation
+@section Compile remote files
+@cindex compile
+@cindex recompile
+
+@value{tramp} provides commands for compilation of files on remote
+machines.  In order to get them loaded, you need to require
+@file{tramp-util.el}:
+
+@lisp
+(require 'tramp-util)
+@end lisp
+
+Afterwards, you can use the commands @code{tramp-compile} and
+@code{tramp-recompile} instead of @code{compile} and @code{recompile},
+respectively; @inforef{Compilation, ,@value{emacsdir}}.  This does not
+work for the @option{ftp} and @option{smb} methods.
+
+The corresponding key bindings and menu entries calling these commands
+are redefined automatically for buffers associated with remote files.
+
+After finishing the compilation, you can use the usual commands like
+@code{previous-error}, @code{next-error} and @code{first-error} for
+navigation in the @file{*Compilation*} buffer.
+
+
 @node Bug Reports
 @chapter Reporting Bugs and Problems
+@cindex bug reports
 
-Bugs and problems with @tramp{} are actively worked on by the development
-team. Feature requests and suggestions are also more than welcome.
+Bugs and problems with @value{tramp} are actively worked on by the
+development team. Feature requests and suggestions are also more than
+welcome.
 
-The @tramp{} mailing list is a great place to get information on working
-with @tramp{}, solving problems and general discussion and advice on topics
-relating to the package.
+The @value{tramp} mailing list is a great place to get information on
+working with @value{tramp}, solving problems and general discussion
+and advice on topics relating to the package.  It is moderated so
+non-subscribers can post but messages will be delayed, possibly up to
+48 hours (or longer in case of holidays), until the moderator approves
+your message.
 
-The  mailing list is at @email{tramp-devel@@mail.freesoftware.fsf.org}.
-Messages sent to this address go to all the subscribers. This is
-@emph{not} the address to send subscription requests to.
+The mailing list is at @email{tramp-devel@@gnu.org}.  Messages sent to
+this address go to all the subscribers. This is @emph{not} the address
+to send subscription requests to.
 
-For help on subscribing to the list, send mail to the administrative
-address, @email{tramp-devel-request@@mail.freesoftware.fsf.org}, with the
-subject @samp{help}.
+Subscribing to the list is performed via
+@uref{http://lists.gnu.org/mailman/listinfo/tramp-devel/,
+the @value{tramp} Mail Subscription Page}.
 
-To report a bug in @tramp{}, you should execute @kbd{M-x tramp-bug}. This
+To report a bug in @value{tramp}, you should execute @kbd{M-x tramp-bug}. This
 will automatically generate a buffer with the details of your system and
-@tramp{} version.
+@value{tramp} version.
 
 When submitting a bug report, please try to describe in excruciating
 detail the steps required to reproduce the problem, the setup of the
-remote machine and any special conditions that exist.
+remote machine and any special conditions that exist.  You should also
+check that your problem is not described already in @xref{Frequently
+Asked Questions}.
 
 If you can identify a minimal test case that reproduces the problem,
 include that with your bug report. This will make it much easier for the
@@ -1299,97 +1965,125 @@ development team to analyze and correct the problem.
 
 @node Frequently Asked Questions
 @chapter Frequently Asked Questions
+@cindex frequently asked questions
+@cindex FAQ
 
 @itemize @bullet
-@item Where can I get the latest @tramp{}?
+@item
+Where can I get the latest @value{tramp}?
 
-@tramp{} is available at
-@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}.
-There is also a Savannah project page, at
-@uref{https://savannah.gnu.org/projects/tramp/}.
+@value{tramp} is available under the URL below.
 
+@noindent
+@uref{ftp://ftp.gnu.org/gnu/tramp/}
 
-@item Which systems does it work on?
+@noindent
+There is also a Savannah project page.
+
+@noindent
+@uref{http://savannah.gnu.org/projects/tramp/}
+
+
+@item
+Which systems does it work on?
 
-The package has been used successfully on Emacs 20 and Emacs 21, as well
-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 has been used successfully on GNU Emacs 20, GNU Emacs 21
+and GNU Emacs 22, as well 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 GNU 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 MS
+Windows NT/2000/XP @value{emacsname}.
 
-There are some informations on Tramp on NT at the following URL; many
-thanks to Joe Stoy for providing the information:
+There is some informations on @value{tramp} on NT at the following URL;
+many thanks to Joe Stoy for providing the information:
 @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/}
 
+@c The link is broken. I've contacted Tom for clarification. Michael.
+@ignore
 The above mostly contains patches to old ssh versions; Tom Roche has a
 Web page with instructions:
 @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html}
+@end ignore
 
-??? Is the XEmacs info correct?
 
-??? Can somebody provide some information for getting it to work on NT
-Emacs?  I think there was some issue with @command{ssh}?
+@item
+@value{tramp} does not connect to the remote host
 
+When @value{tramp} does not connect to the remote host, there are two
+reasons heading the bug mailing list:
 
-@item I can't stop EFS starting with XEmacs
+@itemize @minus
 
-Not all the older versions of @tramp{} supported XEmacs correctly. The
-first thing to do is to make sure that you have the latest version of
-@tramp{} installed.
+@item
+Unknown characters in the prompt
 
-If you do, please try and find out exactly the conditions required for
-the @code{EFS} handlers to fire. If you can, putting a breakpoint on
-@code{efs-ftp-path} and sending in the stack trace along with your bug
-report would make it easier for the developers to work out what is going
-wrong.
+@value{tramp} needs to recognize the prompt on the remote machine
+after execution any command.  This is not possible, when the prompt
+contains unknown characters like escape sequences for coloring.  This
+should be avoided on the remote side.  @xref{Remote shell setup}. for
+setting the regular expression detecting the prompt.
 
+A special problem is the zsh, which uses left-hand side and right-hand
+side prompts in parallel.  Therefore, it is necessary to disable the
+zsh line editor on the remote host.  You shall add to @file{~/.zshrc}
+the following command: @command{[ $TERM = "dumb" ] && unsetopt zle}.
 
-@item File name completion does not work with @tramp{}
+@item
+@value{tramp} doesn't transfer strings with more than 500 characters
+correctly
+
+On some few systems, the implementation of @code{process-send-string}
+seems to be broken for longer strings.  This case, you should
+customize the variable @code{tramp-chunksize} to 500.  For a
+description how to determine whether this is necessary see the
+documentation of @code{tramp-chunksize}.
+@end itemize
+
+
+@item
+File name completion does not work with @value{tramp}
 
 When you log in to the remote machine, do you see the output of
 @command{ls} in color? If so, this may be the cause of your problems.
 
 @command{ls} outputs @acronym{ANSI} escape sequences that your terminal
-emulator interprets to set the colors. These escape sequences will
-confuse @tramp{} however.
+emulator interprets to set the colors.  These escape sequences will
+confuse @value{tramp} however.
 
 In your @file{.bashrc}, @file{.profile} or equivalent on the remote
 machine you probably have an alias configured that adds the option
 @option{--color=yes} or @option{--color=auto}.
 
 You should remove that alias and ensure that a new login @emph{does not}
-display the output of @command{ls} in color. If you still cannot use
-filename completion, report a bug to the @tramp{} developers.
+display the output of @command{ls} in color.  If you still cannot use
+filename completion, report a bug to the @value{tramp} developers.
 
 
-@item File name completion does not work in large directories
+@item
+File name completion does not work in large directories
 
-@tramp{} uses globbing for some operations.  (Globbing means to use the
+@value{tramp} uses globbing for some operations.  (Globbing means to use the
 shell to expand wildcards such as `*.c'.)  This might create long
-command lines, especially in directories with many files.  Some shell
+command lines, especially in directories with many files.  Some shells
 choke on long command lines, or don't cope well with the globbing
 itself.
 
 If you have a large directory on the remote end, you may wish to execute
-a command like @command{ls -d * ..?* > /dev/null} and see if it hangs.
+a command like @samp{ls -d * ..?* > /dev/null} and see if it hangs.
 Note that you must first start the right shell, which might be
 @command{/bin/sh}, @command{ksh} or @command{bash}, depending on which
 of those supports tilde expansion.
 
 
-@item What kinds of systems does @tramp{} work on
-
-@tramp{} really expects the remote system to be a Unix-like system.  The
-local system should preferably be Unix-like, as well, but @tramp{} might
-work on NT with some tweaking.
-
-
-@item How can I get notified when @tramp{} file transfers are complete?
+@item
+How can I get notified when @value{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{emacsname} beep after reading from or writing to the
+remote host.
 
 @lisp
 (defadvice tramp-handle-write-region
@@ -1410,13 +2104,14 @@ Emacs beep after reading from or writing to the remote host.
 @end lisp
 
 
-@item There's this @file{~/.sh_history} file on the remote host which
-  keeps growing and growing.  What's that?
+@item
+There's this @file{~/.sh_history} file on the remote host which keeps
+growing and growing.  What's that?
 
-Sometimes, @tramp{} starts @code{ksh} on the remote host for tilde
-expansion.  Maybe @code{ksh} saves the history by default.  @tramp{}
-tries to turn off saving the history, but maybe you have to help.  For
-example, you could put this in your @file{.kshrc}:
+Sometimes, @value{tramp} starts @command{ksh} on the remote host for
+tilde expansion.  Maybe @command{ksh} saves the history by default.
+@value{tramp} tries to turn off saving the history, but maybe you have
+to help.  For example, you could put this in your @file{.kshrc}:
 
 @example
 if [ -f $HOME/.sh_history ] ; then
@@ -1430,23 +2125,44 @@ if [ "$@{HISTSIZE-unset@}" != "unset" ] ; then
 fi
 @end example
 
+
+@item
+How can I disable @value{tramp}?
+
+Shame on you, why did you read until now?
+
+@ifset emacs
+If you just want to have @value{ftppackagename} as default remote
+files access package, you should apply the following code:
+
+@lisp
+(setq tramp-default-method "ftp")
+@end lisp
+@end ifset
+
+Unloading @value{tramp} can be achieved by applying @kbd{M-x
+tramp-unload-tramp}.
+@ifset emacs
+This resets also the @value{ftppackagename} plugins.
+@end ifset
 @end itemize
 
 
 @c For the developer
 @node Version Control
 @chapter The inner workings of remote version control
+@cindex Version Control
 
-Unlike EFS and ange-ftp, @tramp{} has full shell access to the remote
-machine. This makes it possible to provide version control for files
-accessed under @tramp{}.
+Unlike @value{ftppackagename}, @value{tramp} has full shell access to the
+remote machine. This makes it possible to provide version control for
+files accessed under @value{tramp}.
 
 The actual version control binaries must be installed on the remote
 machine, accessible in the directories specified in
 @var{tramp-remote-path}.
 
 This transparent integration with the version control systems is one of
-the most valuable features provided by @tramp{}, but it is far from perfect.
+the most valuable features provided by @value{tramp}, but it is far from perfect.
 Work is ongoing to improve the transparency of the system.
 
 @menu
@@ -1454,7 +2170,7 @@ Work is ongoing to improve the transparency of the system.
 * Remote Commands::             Executing the version control commands on the remote machine.
 * Changed workfiles::           Detecting if the working file has changed.
 * Checking out files::          Bringing the workfile out of the repository.
-* 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.
 @end menu
 
 
@@ -1463,7 +2179,7 @@ Work is ongoing to improve the transparency of the system.
 
 The VC package uses the existence of on-disk revision control master
 files to determine if a given file is under revision control. These file
-tests happen on the remote machine through the standard @tramp{} mechanisms.
+tests happen on the remote machine through the standard @value{tramp} mechanisms.
 
 
 @node Remote Commands
@@ -1477,11 +2193,11 @@ provide hooks for remote execution of commands.
 
 To work around this, the functions @code{vc-do-command} and
 @code{vc-simple-command} have been advised to intercept requests for
-operations on files accessed via @tramp{}.
+operations on files accessed via @value{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
@@ -1489,7 +2205,7 @@ remote machine as would be seen on the local machine.
 
 As there is currently no way to get access to the mtime of a file on a
 remote machine in a portable way, the @code{vc-workfile-unchanged-p}
-function is advised to call an @tramp{} specific function for remote files.
+function is advised to call an @value{tramp} specific function for remote files.
 
 The @code{tramp-vc-workfile-unchanged-p} function uses the functioning VC
 diff functionality to determine if any changes have occurred between the
@@ -1506,7 +2222,7 @@ this will remain the cost of remote version control.
 
 VC will, by default, check for remote files and refuse to act on them
 when checking out files from the repository. To work around this
-problem, the function @code{vc-checkout} knows about @tramp{} files and
+problem, the function @code{vc-checkout} knows about @value{tramp} files and
 allows version control to occur.
 
 
@@ -1524,10 +2240,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{emacsname} 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
@@ -1565,9 +2282,9 @@ comes into the picture. Each remote machine may have a different version
 of the version control tools and, while this is painful, we need to
 ensure that unavailable features are not used remotely.
 
-To resolve this issue, @tramp{} currently takes the sledgehammer
+To resolve this issue, @value{tramp} currently takes the sledgehammer
 approach of making the release values of the revision control tools
-local to each @tramp{} buffer, forcing VC to determine these values
+local to each @value{tramp} buffer, forcing VC to determine these values
 again each time a new file is visited.
 
 This has, quite obviously, some performance implications. Thankfully,
@@ -1575,31 +2292,32 @@ most of the common operations performed by VC do not actually require
 that the remote version be known. This makes the problem far less
 apparent.
 
-Eventually these values will be captured by @tramp{} on a system by
+Eventually these values will be captured by @value{tramp} on a system by
 system basis and the results cached to improve performance.
 
 
-@node Files directories and paths
-@chapter How file names, directories and paths are mangled and managed.
+@node Files directories and localnames
+@chapter How file names, directories and localnames are mangled and managed.
 
 @menu
-* Path deconstruction::         Breaking a path into its components.
+* Localname deconstruction::    Breaking a localname into its components.
 @end menu
 
 
-@node Path deconstruction
-@section Breaking a path into its components.
+@node Localname deconstruction
+@section Breaking a localname into its components.
 
-@tramp{} filenames are somewhat different, obviously, to ordinary path
+@value{tramp} file names are somewhat different, obviously, to ordinary file
 names. As such, the lisp functions @code{file-name-directory} and
-@code{file-name-nondirectory} are overridden within the @tramp{} package.
+@code{file-name-nondirectory} are overridden within the @value{tramp}
+package.
 
 Their replacements are reasonably simplistic in their approach. They
-dissect the filename, call the original handler on the remote path and
-then rebuild the @tramp{} path with the result.
+dissect the filename, call the original handler on the localname and
+then rebuild the @value{tramp} file name with the result.
 
 This allows the platform specific hacks in the original handlers to take
-effect while preserving the @tramp{} path information.
+effect while preserving the @value{tramp} file name information.
 
 
 @node Issues
@@ -1608,33 +2326,71 @@ effect while preserving the @tramp{} path information.
 @itemize @bullet
 @item The uuencode method does not always work.
 
-Due to the design of @tramp{}, the encoding and decoding programs need to
-read from stdin and write to stdout.  On some systems, @code{uudecode -o
--} will read stdin and write the decoded file to stdout, on other
-systems @code{uudecode -p} does the same thing.  But some systems have
-uudecode implementations which cannot do this at all---it is not
-possible to call these uudecode implementations with suitable parameters
-so that they write to stdout.
+Due to the design of @value{tramp}, the encoding and decoding programs
+need to read from stdin and write to stdout.  On some systems,
+@command{uudecode -o -} will read stdin and write the decoded file to
+stdout, on other systems @command{uudecode -p} does the same thing.
+But some systems have uudecode implementations which cannot do this at
+all---it is not possible to call these uudecode implementations with
+suitable parameters so that they write to stdout.
 
 Of course, this could be circumvented: the @code{begin foo 644} line
 could be rewritten to put in some temporary file name, then
-@code{uudecode} could be called, then the temp file could be printed and
-deleted.
+@command{uudecode} could be called, then the temp file could be
+printed and deleted.
 
 But I have decided that this is too fragile to reliably work, so on some
 systems you'll have to do without the uuencode methods.
 
-@item @tramp{} does not work on XEmacs 20.
+@item @value{tramp} does not work on XEmacs 20.
 
 This is because it requires the macro @code{with-timeout} which does not
 appear to exist in XEmacs 20.  I'm somewhat reluctant to add an
-emulation macro to @tramp{}, but if somebody who uses XEmacs 20 steps
+emulation macro to @value{tramp}, but if somebody who uses XEmacs 20 steps
 forward and wishes to implement and test it, please contact me or the
 mailing list.
 
-@end itemize
+@item The @value{tramp} filename syntax differs between GNU Emacs and XEmacs.
+
+The GNU Emacs maintainers wish to use a unified filename syntax for
+Ange-FTP and @value{tramp} so that users don't have to learn a new
+syntax.  It is sufficient to learn some extensions to the old syntax.
+
+For the XEmacs maintainers, the problems caused from using a unified
+filename syntax are greater than the gains.  The XEmacs package system
+uses EFS for downloading new packages.  So, obviously, EFS has to be
+installed from the start.  If the filenames were unified, @value{tramp}
+would have to be installed from the start, too.
+
+@ifset xemacs
+@strong{Note:} If you'd like to use a similar syntax like
+@value{ftppackagename}, you need the following settings in your init
+file:
 
+@lisp
+(setq tramp-unified-filenames t)
+(require 'tramp)
+@end lisp
+
+The autoload of the @value{emacsname} @value{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{emacsname} download sites
+are added to @code{tramp-default-method-alist} with default method
+@option{ftp} @xref{Default Method}.  These settings shouldn't be touched
+for proper working of the @value{emacsname} package system.
 
+The syntax for unified filenames is described in the @value{tramp} manual
+for @value{emacsothername}.
+@end ifset
+@end itemize
+
+@node Concept Index
+@comment node-name,    next,  previous,      up
+@unnumbered Concept Index
+@printindex cp
+@contents
 @c End of tramp.texi - the TRAMP User Manual
 @bye
 
@@ -1648,3 +2404,11 @@ mailing list.
 @c * Make terminology "inline" vs "out-of-band" consistent.
 @c   It seems that "external" is also used instead of "out-of-band".
 
+@c * M. Albinus
+@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