changeset 50338:155b4b78aa3b

* tramp.el: Version 2.0.31 released. (tramp-handle-expand-file-name): Do not allow ".." to cross file handler boundaries, so that "/user@host:/../foo" expands to itself, rather than "/foo". This is intended to work in conjunction with a change in `file-relative-name' which makes sure to use absolute file names if FILE and DIRECTORY have different handlers. (tramp-handle-insert-directory): Comment out XEmacs kludge. Suggested by Katsumi Yamaoka <yamaoka@jpl.org>. * Makefile.in (../info/tramp): Compile Emacs, instead of XEmacs, version of manual. * tramp.texi (Auto-save and Backup): New node.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Sat, 29 Mar 2003 15:16:57 +0000
parents f4504bc1f3bf
children b8ecb0403fa1
files lisp/ChangeLog lisp/net/tramp-smb.el lisp/net/tramp.el lisp/net/trampver.el man/ChangeLog man/Makefile.in man/tramp.texi man/trampver.texi
diffstat 8 files changed, 396 insertions(+), 129 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Mar 29 02:57:19 2003 +0000
+++ b/lisp/ChangeLog	Sat Mar 29 15:16:57 2003 +0000
@@ -1,3 +1,27 @@
+2003-03-29  Kai Gro,A_(Bjohann  <kai.grossjohann@gmx.net>
+
+	* tramp.el: Version 2.0.31 released.
+	(tramp-handle-expand-file-name): Do not allow ".." to
+	cross file handler boundaries, so that "/user@host:/../foo"
+	expands to itself, rather than "/foo".  This is intended to work
+	in conjunction with a change in `file-relative-name' which makes
+	sure to use absolute file names if FILE and DIRECTORY have
+	different handlers. 
+	(tramp-handle-insert-directory): Comment out XEmacs
+	kludge.  Suggested by Katsumi Yamaoka <yamaoka@jpl.org>.
+
+2003-03-29  Michael Albinus  <Michael.Albinus@alcatel.de>
+
+	* trampver.el: New file, to support Autoconf in Tramp CVS
+	repository.
+	* tramp.el (tramp-version, tramp-bug-report-address): Moved to
+	trampver.el, which is required now.
+	(tramp-chunksize): Type can be nil as well.  Reported
+	by Markus Rost <rost@math.ohio-state.edu>.
+	* tramp-smb.el (tramp-smb-read-file-entry): Make reading size of a
+	listing entry more robust.  Ranges from 10 chars (Samba 1) to 7-9
+	chars (Samba 2).
+
 2003-03-29  John Paul Wallington  <jpw@gnu.org>
 
 	* international/mule.el (with-category-table): Use `make-symbol'
--- a/lisp/net/tramp-smb.el	Sat Mar 29 02:57:19 2003 +0000
+++ b/lisp/net/tramp-smb.el	Sat Mar 29 15:16:57 2003 +0000
@@ -754,21 +754,38 @@
 ;; They should have the format
 ;;
 ;; \s-\{2,2}                              - leading spaces
-;; \S-\(.*\S-\)\s-*                       - file name, 32 chars, left bound
+;; \S-\(.*\S-\)\s-*                       - file name, 30 chars, left bound
+;; \s-+[ADHRSV]*                          - permissions, 7 chars, right bound
 ;; \s-                                    - space delimeter
-;; \s-*[ADHRS]*                           - permissions, 5 chars, right bound
-;; \s-                                    - space delimeter
-;; \s-*[0-9]+                             - size, 8 (Samba) or 7 (Windows)
-;;                                          chars, right bound
+;; \s-+[0-9]+                             - size, 8 chars, right bound
 ;; \s-\{2,2\}                             - space delimeter
 ;; \w\{3,3\}                              - weekday
 ;; \s-                                    - space delimeter
+;; \w\{3,3\}                              - month
+;; \s-                                    - space delimeter
 ;; [ 19][0-9]                             - day
 ;; \s-                                    - space delimeter
 ;; [0-9]\{2,2\}:[0-9]\{2,2\}:[0-9]\{2,2\} - time
 ;; \s-                                    - space delimeter
 ;; [0-9]\{4,4\}                           - year
 ;;
+;; samba/src/client.c (http://samba.org/doxygen/samba/client_8c-source.html)
+;; has function display_finfo:
+;;
+;;   d_printf("  %-30s%7.7s %8.0f  %s",
+;;            finfo->name,
+;;            attrib_string(finfo->mode),
+;;            (double)finfo->size,
+;;            asctime(LocalTime(&t)));
+;;
+;; in Samba 1.9, there's the following code:
+;;
+;;   DEBUG(0,("  %-30s%7.7s%10d  %s",
+;;  	   CNV_LANG(finfo->name),
+;;	   attrib_string(finfo->mode),
+;;	   finfo->size,
+;;	   asctime(LocalTime(&t))));
+;;
 ;; Problems:
 ;; * Modern regexp constructs, like spy groups and counted repetitions, aren't
 ;;   available in older Emacsen.
@@ -828,27 +845,28 @@
 
 	;; size
 	(if (string-match "\\([0-9]+\\)$" line)
-	    (setq
-	     size (string-to-number (match-string 1 line))
-	     line (substring
-		   line 0 (- (max 8 (1+ (length (match-string 1 line)))))))
+	    (let ((length (- (max 10 (1+ (length (match-string 1 line)))))))
+	      (setq size (string-to-number (match-string 1 line)))
+	      (when (string-match "\\([ADHRSV]+\\)" (substring line length))
+		(setq length (+ length (match-end 0))))
+	      (setq line (substring line 0 length)))
 	  (return))
 
-	;; mode
-	(if (string-match "\\(\\([ADHRS]+\\)?\\s-?\\)$" line)
+	;; mode: ARCH, DIR, HIDDEN, RONLY, SYSTEM, VOLID
+	(if (string-match "\\([ADHRSV]+\\)?$" line)
 	    (setq
-	     mode (or (match-string 2 line) "")
+	     mode (or (match-string 1 line) "")
 	     mode (save-match-data (format
 		    "%s%s"
 		    (if (string-match "D" mode) "d" "-")
 		    (mapconcat
 		     (lambda (x) "") "    "
 		     (concat "r" (if (string-match "R" mode) "-" "w") "x"))))
-	     line (substring line 0 (- (1+ (length (match-string 2 line))))))
+	     line (substring line 0 -7))
 	  (return))
 
 	;; localname
-	(if (string-match "^\\s-+\\(\\S-\\(.*\\S-\\)?\\)\\s-+$" line)
+	(if (string-match "^\\s-+\\(\\S-\\(.*\\S-\\)?\\)\\s-*$" line)
 	    (setq localname (match-string 1 line))
 	  (return))))
 
--- a/lisp/net/tramp.el	Sat Mar 29 02:57:19 2003 +0000
+++ b/lisp/net/tramp.el	Sat Mar 29 15:16:57 2003 +0000
@@ -1,8 +1,9 @@
-;;; tramp.el --- Transparent Remote Access, Multiple Protocol -*- coding: iso-8859-1; -*-
+;;; -*- mode: Emacs-Lisp; coding: iso-8859-1; -*-
+;;; tramp.el --- Transparent Remote Access, Multiple Protocol
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
-;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE 
+;; Author: kai.grossjohann@gmx.net
 ;; Keywords: comm, processes
 
 ;; This file is part of GNU Emacs.
@@ -29,8 +30,7 @@
 ;; the local and the remote host, whereas tramp.el uses a combination
 ;; of rsh and rcp or other work-alike programs, such as ssh/scp.
 ;;
-;; For more detailed instructions, please see the info file, which is
-;; included in the file `tramp.tar.gz' mentioned below.
+;; For more detailed instructions, please see the info file.
 ;;
 ;; Notes:
 ;; -----
@@ -46,13 +46,11 @@
 ;;
 ;; Also see the todo list at the bottom of this file.
 ;;
-;; The current version of tramp.el can be retrieved from the following
-;; URL:  ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz
-;; For your convenience, the *.el file is available separately from
-;; the same directory.
+;; The current version of Tramp can be retrieved from the following URL:
+;;            http://savannah.nongnu.org/download/tramp/
 ;;
 ;; There's a mailing list for this, as well.  Its name is:
-;;                tramp-devel@mail.freesoftware.fsf.org
+;;            tramp-devel@mail.freesoftware.fsf.org
 ;; Send a mail with `help' in the subject (!) to the administration
 ;; address for instructions on joining the list.  The administration
 ;; address is:
@@ -69,14 +67,8 @@
 
 ;;; Code:
 
-;; In the Tramp CVS repository, the version numer is auto-frobbed from
-;; the Makefile, so you should edit the top-level Makefile to change
-;; the version number.
-(defconst tramp-version "2.0.30"
-  "This version of tramp.")
-
-(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
-  "Email address to send bug reports to.")
+;; The Tramp version number and bug report address, as prepared by configure.
+(require 'trampver)
 
 (require 'timer)
 (require 'format-spec)                  ;from Gnus 5.8, also in tar ball
@@ -1275,7 +1267,7 @@
 Please raise a bug report via \"M-x tramp-bug\" if your system needs
 this variable to be set as well."
   :group 'tramp
-  :type 'integer)
+  :type '(choice (const nil) integer))
 
 ;;; Internal Variables:
 
@@ -2831,6 +2823,10 @@
 		   (file-name-nondirectory localname)))))
       (sit-for 1)			;needed for rsh but not ssh?
       (tramp-wait-for-output))
+    ;; The following let-binding is used by code that's commented
+    ;; out.  Let's leave the let-binding in for a while to see
+    ;; that the commented-out code is really not needed.  Commenting-out
+    ;; happened on 2003-03-13.
     (let ((old-pos (point)))
       (insert-buffer-substring
        (tramp-get-buffer multi-method method user host))
@@ -2843,13 +2839,16 @@
       (save-excursion
 	(tramp-send-command multi-method method user host "cd")
 	(tramp-wait-for-output))
-      ;; Another XEmacs specialty follows.  What's the right way to do
-      ;; it?
-      (when (and (featurep 'xemacs)
-		 (eq major-mode 'dired-mode))
-	(save-excursion
-	  (require 'dired)
-	  (dired-insert-set-properties old-pos (point)))))))
+      ;; For the time being, the XEmacs kludge is commented out.
+      ;; Please test it on various XEmacs versions to see if it works.
+;;       ;; Another XEmacs specialty follows.  What's the right way to do
+;;       ;; it?
+;;       (when (and (featurep 'xemacs)
+;; 		 (eq major-mode 'dired-mode))
+;; 	(save-excursion
+;; 	  (require 'dired)
+;; 	  (dired-insert-set-properties old-pos (point))))
+      )))
 
 ;; Continuation of kluge to pacify byte-compiler.
 ;;(eval-when-compile
@@ -2917,20 +2916,33 @@
 	    (setq uname (buffer-substring (point) (tramp-line-end-position)))
 	    (setq localname (concat uname fname))
 	    (erase-buffer)))
-	;; Look if localname starts with "/../" construct.  If this is
-	;; the case, then we return a local name instead of a remote name.
-	(if (string-match "^/\\.\\./" localname)
-	    (expand-file-name (substring localname 3))
-	  ;; No tilde characters in file name, do normal
-	  ;; expand-file-name (this does "/./" and "/../").  We bind
-	  ;; directory-sep-char here for XEmacs on Windows, which
-	  ;; would otherwise use backslash.
-	  (let ((directory-sep-char ?/))
-	    (tramp-make-tramp-file-name
-	     multi-method method user host
-	     (tramp-drop-volume-letter
-	      (tramp-run-real-handler 'expand-file-name
-				      (list localname))))))))))
+	;; No tilde characters in file name, do normal
+	;; expand-file-name (this does "/./" and "/../").  We bind
+	;; directory-sep-char here for XEmacs on Windows, which
+	;; would otherwise use backslash.
+	(let ((directory-sep-char ?/))
+	  (tramp-make-tramp-file-name
+	   multi-method method user host
+	   (tramp-drop-volume-letter
+	    (tramp-run-real-handler 'expand-file-name
+				    (list localname)))))))))
+
+;; old version follows.  it uses ".." to cross file handler
+;; boundaries.
+;; 	;; Look if localname starts with "/../" construct.  If this is
+;; 	;; the case, then we return a local name instead of a remote name.
+;; 	(if (string-match "^/\\.\\./" localname)
+;; 	    (expand-file-name (substring localname 3))
+;; 	  ;; No tilde characters in file name, do normal
+;; 	  ;; expand-file-name (this does "/./" and "/../").  We bind
+;; 	  ;; directory-sep-char here for XEmacs on Windows, which
+;; 	  ;; would otherwise use backslash.
+;; 	  (let ((directory-sep-char ?/))
+;; 	    (tramp-make-tramp-file-name
+;; 	     multi-method method user host
+;; 	     (tramp-drop-volume-letter
+;; 	      (tramp-run-real-handler 'expand-file-name
+;; 				      (list localname))))))))))
 
 ;; Remote commands.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/net/trampver.el	Sat Mar 29 15:16:57 2003 +0000
@@ -0,0 +1,41 @@
+;;; -*- mode: Emacs-Lisp; coding: iso-8859-1; -*-
+;;; trampver.el --- Transparent Remote Access, Multiple Protocol
+;;; lisp/trampver.el.  Generated from trampver.el.in by configure.
+
+;; Copyright (C) 2003 Free Software Foundation, Inc.
+
+;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE 
+;; Keywords: comm, processes
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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.
+
+;; GNU Emacs 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.
+
+;;; Code:
+
+;; In the Tramp CVS repository, the version numer and the bug report address
+;; are auto-frobbed from configure.ac, so you should edit that file and run
+;; "autoconf && ./configure" to change them.
+
+(defconst tramp-version "2.0.31"
+  "This version of Tramp.")
+
+(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
+  "Email address to send bug reports to.")
+
+(provide 'trampver)
+
+;;; trampver.el ends here
--- a/man/ChangeLog	Sat Mar 29 02:57:19 2003 +0000
+++ b/man/ChangeLog	Sat Mar 29 15:16:57 2003 +0000
@@ -1,3 +1,25 @@
+2003-03-29  Kai Gro,A_(Bjohann  <kai.grossjohann@gmx.net>
+
+	* Makefile.in (../info/tramp): Compile Emacs, instead of XEmacs,
+	version of manual.
+
+	* tramp.texi (Auto-save and Backup): New node.
+
+2003-03-29  Michael Albinus  <Michael.Albinus@alcatel.de>
+
+	* tramp.texi (Top): Include trampver.texi.  Rename "Emacs" to "GNU
+	Emacs" in order to have better differentiation to "XEmacs".
+	`emacs-other-name', `emacs-other-dir' and `emacs-other-file-name'
+	are new macros in order to point to the other Emacs flavor where
+	appropriate.  In info case, point to node `Installation' in order
+	to explain how to generate the other way.  In html case, make a
+	link to the other html file.
+	(Obtaining TRAMP): Added a paragraph saying to perform `autoconf'
+	after CVS checkout/update.
+	(Installation): Completely rewritten.
+	(Installation parameters, Load paths): New sections under
+	`Installation'.
+
 2003-02-28  Kai Gro,A_(Bjohann  <kai.grossjohann@uni-duisburg.de>
 
 	* tramp.texi: Version 2.0.30 released.
--- a/man/Makefile.in	Sat Mar 29 02:57:19 2003 +0000
+++ b/man/Makefile.in	Sat Mar 29 15:16:57 2003 +0000
@@ -268,7 +268,7 @@
 	$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
 
 ../info/tramp: tramp.texi
-	cd $(srcdir); $(MAKEINFO) tramp.texi
+	cd $(srcdir); $(MAKEINFO) -D emacs tramp.texi
 tramp.dvi: tramp.texi
 	$(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
 
--- a/man/tramp.texi	Sat Mar 29 02:57:19 2003 +0000
+++ b/man/tramp.texi	Sat Mar 29 15:16:57 2003 +0000
@@ -8,12 +8,10 @@
 @c This is *so* much nicer :)
 @footnotestyle end
 
-@c In the Tramp CVS, the version number is auto-frobbed from the
-@c Makefile, so you should edit the top-level Makefile to change
-@c the version number.
-@macro trampver{}
-2.0.30
-@end macro
+@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.
+@include trampver.texi
 
 @c Entries for @command{install-info} to use
 @dircategory Emacs
@@ -27,15 +25,16 @@
 @sc{tramp}
 @end macro
 
-@c Distinguish between GNU Emacs and XEmacs.  Derived from the
-@c Makefile variable $(EMACS-ID).  Valid values are `emacs' and `xemacs'.
-@set emacs
-
 @c Some flags which make the text independent on the (X)Emacs flavor.
+@c "emacs" resp "xemacs" are set in the Makefile.
+
 @c GNU Emacs values.
 @ifset emacs
-@set emacs-name               Emacs
+@set emacs-name               GNU Emacs
 @set emacs-dir                emacs
+@set emacs-other-name         XEmacs
+@set emacs-other-dir          xemacs
+@set emacs-other-file-name    tramp-xemacs.html
 @set ftp-package-name         Ange-FTP
 @set tramp-prefix             /
 @set tramp-prefix-single-hop
@@ -48,6 +47,9 @@
 @ifset xemacs
 @set emacs-name               XEmacs
 @set emacs-dir                xemacs
+@set emacs-other-name         GNU Emacs
+@set emacs-other-dir          emacs
+@set emacs-other-file-name    tramp-emacs.html
 @set ftp-package-name         EFS
 @set tramp-prefix             /[
 @set tramp-prefix-single-hop  [
@@ -122,6 +124,16 @@
 You can find the latest version of this document on the web at
 @uref{http://www.freesoftware.fsf.org/tramp/}.
 
+The manual has been generated for @value{emacs-name}.
+@ifinfo
+If you want to read the info pages for @value{emacs-other-name}, you
+should read in @ref{Installation} how to create them.
+@end ifinfo
+@ifhtml
+If you're using the other Emacs flavour, you should read the
+@uref{@value{emacs-other-file-name}, @value{emacs-other-name}} pages.
+@end ifhtml
+
 @ifhtml
 This manual is also available as a @uref{tramp_ja.html, Japanese
 translation}.
@@ -176,6 +188,7 @@
 * Remote Programs::             How @tramp{} finds and uses programs on the remote machine.
 * Remote shell setup::          Remote shell setup hints.
 * Windows setup hints::         Issues with Cygwin ssh.
+* Auto-save and Backup::        Auto-save and Backup.
 
 Using @tramp
 
@@ -199,7 +212,7 @@
 
 How file names, directories and localnames are mangled and managed.
 
-* Localname deconstruction::         Breaking a localname into its components.
+* Localname deconstruction::    Breaking a localname into its components.
 
 @end detailmenu
 @end menu
@@ -368,23 +381,23 @@
 @chapter Obtaining @tramp{}.
 @cindex 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.  But Emacs (21.4 or later) includes @tramp{}
-already, and there is a @tramp{} package for XEmacs, as well.  So
-maybe it is easier to just use those.  But if you want the bleeding
+@tramp{} is freely available on the Internet and the latest release
+may be downloaded from
+@uref{http://savannah.nongnu.org/download/tramp/}. This
+release includes the full documentation and code for @tramp{},
+suitable for installation.  But Emacs (21.4 or later) includes
+@tramp{} already, and there is a @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, @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.
+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 the
-following URL and then clicking on the CVS link in the navigation bar at
-the top.
+following URL and then clicking on the CVS link in the navigation bar
+at the top.
 
 @noindent
 @uref{http://savannah.gnu.org/projects/tramp/}
@@ -404,15 +417,25 @@
 @end example
 
 @noindent
-You should now have a directory @file{~/@value{emacs-dir}/tramp} containing the latest
-version of @tramp{}. You can fetch the latest updates from the repository
-by issuing the command:
+You should now have a directory @file{~/@value{emacs-dir}/tramp}
+containing the latest version of @tramp{}. You can fetch the latest
+updates from the repository by issuing the command:
 
 @example
 ] @strong{cd ~/@value{emacs-dir}/tramp}
 ] @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:
+
+@example
+] @strong{cd ~/@value{emacs-dir}/tramp}
+] @strong{autoconf}
+@end example
+
 
 @node History
 @chapter History of @tramp{}
@@ -442,33 +465,40 @@
 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 @bullet
 @item
 Choose a directory, say @file{~/@value{emacs-dir}/}.  Change into that
 directory and unpack the tarball.  This will give you a directory
-@file{~/@value{emacs-dir}/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{~/@value{emacs-dir}/tramp/lisp/}, by issuing a command like the
-following from the top level directory
-@file{~/@value{emacs-dir}/tramp/}:
+@file{~/@value{emacs-dir}/tramp-@trampver{}/} which contains
+subdirectories @file{lisp} for the Lisp code and @file{texi} for the
+documentation.  Make a symbolic link:
 
 @example
-make EMACS=@value{emacs-dir} all
+ln -s tramp-@trampver{} tramp
 @end example
 
-If there are missing libraries reported it is likely they are provided
-in the @file{~/@value{emacs-dir}/tramp/contrib/} directory.  This
-case, you need to call @command{make} like this:
-
-@example
-make EMACS=@value{emacs-dir} USE_CONTRIB=1 all
-@end example
+@item
+@command{cd} to @file{~/@value{emacs-dir}/tramp/} and type
+@command{./configure} to configure Tramp for your system.
+
+Running `configure' takes awhile.  While running, it prints some
+messages telling which features it is checking for.
+
+@item
+Type @command{make} to build the byte-compiled Lisp files as well as
+the Info manual.
+
+@item
+Type @command{make install} to install the Tramp Lisp files and Info
+manual.
+
+@item
+You can remove the byte-compiled Lisp files and the Info manual from
+the source directory by typing @command{make clean}.  To also remove
+the files that @command{configure} created, type @command{make
+distclean}.
 
 @item
 NOTE: If you run into problems running the example @command{make}
@@ -480,11 +510,86 @@
 Something similar can be done to create the info manual.  Just change
 to directory @file{~/@value{emacs-dir}/tramp/texi} and load the
 @file{tramp.texi} file in @value{emacs-name}.  Then press @kbd{M-x
-texinfo-format-buffer @key{RET}} to generate @file{tramp.info}.
-
-@item
-Tell @value{emacs-name} about the new Lisp directory and the
-@tramp{} package with the following lines in @file{~/.emacs}:
+texinfo-format-buffer @key{RET}} to generate
+@file{~/@value{emacs-dir}/tramp/info/tramp}.
+@end itemize
+
+@menu
+* Installation parameters::     Parameters in order to control installation.
+* Load paths::                  How to plug-in @tramp{} into your environment.
+@end menu
+
+@node Installation parameters
+@section Parameters in order to control installation.
+@cindex installation
+
+By default, @command{make install} will install @tramp{}'s files in
+@file{@value{lispdir}} and @file{@value{infodir}}.  You can specify an
+installation prefix other than @file{@value{prefix}} by giving
+@command{configure} the option @command{--prefix=PATH}.
+
+If your installed copy of Emacs is named something other than
+@command{@value{emacs-dir}}, you will need to tell `make' where to find it so
+that it can correctly byte-compile the @tramp{} sources.
+
+For example, to force the use of @value{emacs-other-name} you might do
+this:
+
+@example
+./configure --with-@value{emacs-other-dir}
+make
+make install
+@end example
+
+or this:
+
+@example
+./configure
+make EMACS=/usr/bin/@value{emacs-other-dir}-21.4
+make install
+@end example
+
+The syntax of @tramp{} file names is different for @value{emacs-name}
+and @value{emacs-other-name}.  The Info manual will be generated for
+the Emacs flavor choosen in the @command{configure} phase. If you want
+the Info manual for the other version, you need to set the variable
+@command{EMACS_INFO} to @command{make}:
+
+@example
+./configure --with-@value{emacs-dir}
+make EMACS_INFO=@value{emacs-other-dir}
+@end example
+
+Also, the @command{--prefix=PATH} option to @command{configure} may
+not be general enough to set the paths you want.  If not, you can pass
+variables to the @command{make} command to control the installation.
+For a complete list of tweakable variables, look in the makefile.
+
+For example, to put the Lisp files in @file{~/elisp} and the Info file
+in @file{~/info}, you would type:
+
+@example
+./configure
+make
+make lispdir=~/elisp infodir=~/info install
+@end example
+
+@tramp{} has some packages in its @file{contrib} directory which are
+missing in older Emacsen.  If you want to use them, you must use the
+@command{USE_CONTRIB} environment variable:
+
+@example
+make USE_CONTRIB=1
+make USE_CONTRIB=1 install
+@end example
+
+@node Load paths
+@section How to plug-in @tramp{} into your environment.
+@cindex installation
+
+If you don't install @tramp{} into the intended directories, but prefer
+to use from the source directory, you need to add the following lines
+into your @file{.emacs}:
 
 @lisp
 (add-to-list 'load-path "~/@value{emacs-dir}/tramp/lisp/")
@@ -492,22 +597,33 @@
 (require 'tramp)
 @end lisp
 
-The second @command{add-to-list} must be used only if you've compiled
-with the @command{USE_CONTRIB} parameter.
-
-@item
+The second load-path must be used only if you've applied the
+@command{USE_CONTRIB} parameter.
+
+@ifset xemacs
+NOTE: For @value{emacs-name}, the package @file{fsf-compat} must be
+installed.  For details on package installation, see @ref{Packages, ,
+,xemacs}.
+@ifhtml
+(If the previous link doesn't work, try the @value{emacs-name}
+documentation at
+@uref{http://www.xemacs.org/Documentation/packageGuide.html,the
+@value{emacs-name} site}.)
+@end ifhtml
+@end ifset
+
 To be able to read the Info documentation, create a file
-@file{~/@value{emacs-dir}/tramp/texi/dir} using the
+@file{~/@value{emacs-dir}/tramp/info/dir} using the
 @command{install-info} command, and add the directory to the search
 path for Info.
 
 NOTE:
 On systems using the @cite{gnu} version of @command{install-info}, the
 @command{install-info} syntax is very direct and simple.  One can
-change to directory @file{~/@value{emacs-dir}/tramp/texi} and type:
+change to directory @file{~/@value{emacs-dir}/tramp/info} and type:
 
 @example
-install-info tramp.info dir
+install-info tramp dir
 @end example
 
 and a @file{dir} file will be created with the @tramp{}
@@ -522,47 +638,34 @@
 @value{emacs-name} at @file{/usr/info/dir}.  Copy the top of this file
 down to the first occurrence of @code{* Menu} including that line plus
 one more blank line, to your working directory
-@file{~/@value{emacs-dir}/tramp/texi}, or use the sample
+@file{~/@value{emacs-dir}/tramp/info}, or use the sample
 @file{~/@value{emacs-dir}/tramp/texi/dir_sample}.
 
 Once a @file{dir} file is in place, this command will make the entry:
 
 @example
-install-info --infodir=. tramp.info
+install-info --infodir=. tramp
 @end example
 
 If you want it in a specific category see @kbd{man install-info} for
 further details.
 
 If the environment variable @env{INFOPATH} is set, add the directory
-@file{~/@value{emacs-dir}/tramp/texi/} to it.  Else, add the directory to
+@file{~/@value{emacs-dir}/tramp/info/} to it.  Else, add the directory to
 @ifset emacs
 @code{Info-default-directory-list}, as follows:
 
 @lisp
-(add-to-list 'Info-default-directory-list "~/@value{emacs-dir}/tramp/texi/")
+(add-to-list 'Info-default-directory-list "~/@value{emacs-dir}/tramp/info/")
 @end lisp
 @end ifset
 @ifset xemacs
 @code{Info-directory-list}, as follows:
 @lisp
-(add-to-list 'Info-directory-list "~/@value{emacs-dir}/tramp/texi/")
+(add-to-list 'Info-directory-list "~/@value{emacs-dir}/tramp/info/")
 @end lisp
 @end ifset
 
-@end itemize
-
-@ifset xemacs
-For @value{emacs-name}, the package @file{fsf-compat} must be installed.
-For details on package installation, see @ref{Packages, , ,xemacs}.
-@ifhtml
-(If the previous link doesn't work, try the @value{emacs-name}
-documentation at
-@uref{http://www.xemacs.org/Documentation/packageGuide.html,the
-@value{emacs-name} site}.)
-@end ifhtml
-@end ifset
-
 @node Configuration
 @chapter Configuring @tramp{} for use
 @cindex configuration
@@ -596,6 +699,7 @@
 * Remote Programs::             How @tramp{} finds and uses programs on the remote machine.
 * Remote shell setup::          Remote shell setup hints.
 * Windows setup hints::         Issues with Cygwin ssh.
+* Auto-save and Backup::        Auto-save and Backup.
 @end menu
 
 
@@ -1419,6 +1523,38 @@
 @end table
 
 
+@node Auto-save and Backup
+@section Auto-save and Backup configuration
+@cindex auto-save
+@cindex backup
+@vindex backup-directory-alist
+
+Explaining auto-save is still to do.
+
+Normally, Emacs writes backup files to the same directory as the
+original files, but this behavior can be changed via the variable
+@code{backup-directory-alist}.  In connection with @tramp{}, this can
+have unexpected side effects.  Suppose that you specify that all backups
+should go to the directory @file{~/.emacs.d/backups/}, and then you edit
+the file @file{/su:root@@localhost:/etc/secretfile}.  The effect is that
+the backup file will be owned by you and not by root, thus possibly
+enabling others to see it even if they were not intended to see it.
+
+When @code{backup-directory-alist} is nil (the default), such problems
+do not occur.
+
+If you wish to customize the variable, the workaround is to include
+special settings for Tramp files.  For example, the following statement
+effectively `turns off' the effect of @code{backup-directory-alist} for
+@tramp{} files:
+
+@lisp
+(require 'tramp)
+(add-to-list 'backup-directory-alist
+             (cons tramp-file-name-regexp nil))
+@end lisp
+
+
 @node Windows setup hints
 @section Issues with Cygwin ssh
 @cindex Cygwin, issues
@@ -1730,7 +1866,7 @@
 @tramp{} is available under the URL below.
 
 @noindent
-@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}
+@uref{http://savannah.nongnu.org/download/tramp/}
 
 @noindent
 There is also a Savannah project page.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/man/trampver.texi	Sat Mar 29 15:16:57 2003 +0000
@@ -0,0 +1,14 @@
+@c -*-texinfo-*-
+@c texi/trampver.texi.  Generated from trampver.texi.in by configure.
+
+@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.
+@macro trampver{}
+2.0.31
+@end macro
+
+@c Other flags from configuration
+@set prefix /usr/local
+@set lispdir /usr/local/share/emacs/site-lisp
+@set infodir /usr/local/info