aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2007-07-22 16:42:02 +0000
committerMichael Albinus2007-07-22 16:42:02 +0000
commit439e574bdc78518a415af4fecb65e41334205dbc (patch)
treed251684ab61a55f1383ed881ee36dbb3f45c4ef6
parent0389072b378cf15d0e7991146b3a3594dad8e9b5 (diff)
downloademacs-439e574bdc78518a415af4fecb65e41334205dbc.tar.gz
emacs-439e574bdc78518a415af4fecb65e41334205dbc.zip
Sync with Tramp 2.1.10.
-rw-r--r--man/ChangeLog12
-rw-r--r--man/tramp.texi167
-rw-r--r--man/trampver.texi4
3 files changed, 122 insertions, 61 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 4625288e6d7..82a4aabb7aa 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,15 @@
12007-07-22 Michael Albinus <michael.albinus@gmx.de>
2
3 Sync with Tramp 2.1.10.
4
5 * tramp.texi (trampfn): Expand macro implementation in order to handle
6 empty arguments.
7 (trampfnmhl, trampfnuhl, trampfnhl): Remove macros. Replace all
8 occurencies by trampfn.
9 (Frequently Asked Questions): Extend example code for host
10 identification in the modeline. Add bbdb to approaches shortening Tramp
11 file names to be typed.
12
12007-07-21 Eli Zaretskii <eliz@gnu.org> 132007-07-21 Eli Zaretskii <eliz@gnu.org>
2 14
3 * vc2-xtra.texi (Customizing VC) <vc-handled-backends>: Update the 15 * vc2-xtra.texi (Customizing VC) <vc-handled-backends>: Update the
diff --git a/man/tramp.texi b/man/tramp.texi
index eac0a31e0e2..235f0b65254 100644
--- a/man/tramp.texi
+++ b/man/tramp.texi
@@ -17,23 +17,24 @@
17 17
18@include trampver.texi 18@include trampver.texi
19 19
20@c Macros for formatting a filename. 20@c Macro for formatting a filename according to the repective syntax.
21@c trampfn is for a full filename, trampfnmhl means method, host, localname 21@c xxx and yyy are auxiliary macros in order to omit leading and
22@c were given, and so on. 22@c trailing whitespace. Not very elegant, but I don't know it better.
23@macro trampfn {method, user, host, localname}
24@value{prefix}\method\@value{postfixhop}\user\@@\host\@value{postfix}\localname\
25@end macro
26 23
27@macro trampfnmhl {method, host, localname} 24@macro xxx {one}@c
28@value{prefix}\method\@value{postfixhop}\host\@value{postfix}\localname\ 25@set \one\@c
29@end macro 26@end macro
30 27
31@macro trampfnuhl {user, host, localname} 28@macro yyy {one, two}@c
32@value{prefix}\user\@@\host\@value{postfix}\localname\ 29@xxx{x\one\}@c
30@ifclear x@c
31\one\@w{}\two\@c
32@end ifclear
33@clear x\one\@c
33@end macro 34@end macro
34 35
35@macro trampfnhl {host, localname} 36@macro trampfn {method, user, host, localname}@c
36@value{prefix}\host\@value{postfix}\localname\ 37@value{prefix}@yyy{\method\,@value{postfixhop}}@yyy{\user\,@@}\host\@value{postfix}\localname\@c
37@end macro 38@end macro
38 39
39@copying 40@copying
@@ -497,7 +498,7 @@ repository. Being part of the GNU Emacs repository happened in June
497installed. It is initially configured to use the @command{scp} 498installed. It is initially configured to use the @command{scp}
498program to connect to the remote host. So in the easiest case, you 499program to connect to the remote host. So in the easiest case, you
499just type @kbd{C-x C-f} and then enter the filename 500just type @kbd{C-x C-f} and then enter the filename
500@file{@trampfnuhl{user, machine, /path/to.file}}. 501@file{@trampfn{, user, machine, /path/to.file}}.
501 502
502On some hosts, there are problems with opening a connection. These are 503On some hosts, there are problems with opening a connection. These are
503related to the behavior of the remote shell. See @xref{Remote shell 504related to the behavior of the remote shell. See @xref{Remote shell
@@ -1180,7 +1181,7 @@ implementation of @command{ssh}. Or you use Kerberos and thus like
1180For the special case of editing files on the local host as another 1181For the special case of editing files on the local host as another
1181user, see the @option{su} or @option{sudo} methods. They offer 1182user, see the @option{su} or @option{sudo} methods. They offer
1182shortened syntax for the @samp{root} account, like 1183shortened syntax for the @samp{root} account, like
1183@file{@trampfnmhl{su, , /etc/motd}}. 1184@file{@trampfn{su, , , /etc/motd}}.
1184 1185
1185People who edit large files may want to consider @option{scpc} instead 1186People who edit large files may want to consider @option{scpc} instead
1186of @option{ssh}, or @option{pscp} instead of @option{plink}. These 1187of @option{ssh}, or @option{pscp} instead of @option{plink}. These
@@ -1273,11 +1274,11 @@ If you, for example, use @value{tramp} mainly to contact the host
1273 tramp-default-host "target") 1274 tramp-default-host "target")
1274@end lisp 1275@end lisp
1275 1276
1276Then the simple file name @samp{@trampfnmhl{ssh,,}} will connect you 1277Then the simple file name @samp{@trampfn{ssh, , ,}} will connect you
1277to John's home directory on target. 1278to John's home directory on target.
1278@ifset emacs 1279@ifset emacs
1279Note, however, that the most simplification @samp{@trampfnmhl{,,}} 1280Note, however, that the most simplification @samp{/::} won't work,
1280won't work, because @samp{/:} is the prefix for quoted file names. 1281because @samp{/:} is the prefix for quoted file names.
1281@end ifset 1282@end ifset
1282 1283
1283 1284
@@ -1339,7 +1340,7 @@ rule:
1339(add-to-list 'tramp-default-proxies-alist 1340(add-to-list 'tramp-default-proxies-alist
1340 '("\\`bastion\\.your\\.domain\\'" 1341 '("\\`bastion\\.your\\.domain\\'"
1341 "\\`bird\\'" 1342 "\\`bird\\'"
1342 "@trampfnmhl{ssh, jump.your.domain,}")) 1343 "@trampfn{ssh, , jump.your.domain,}"))
1343@end lisp 1344@end lisp
1344 1345
1345@var{proxy} can contain the patterns @code{%h} or @code{%u}. These 1346@var{proxy} can contain the patterns @code{%h} or @code{%u}. These
@@ -1352,15 +1353,15 @@ non-local access, you might add the following rule:
1352 1353
1353@lisp 1354@lisp
1354(add-to-list 'tramp-default-proxies-alist 1355(add-to-list 'tramp-default-proxies-alist
1355 '("\\.your\\.domain\\'" "\\`root\\'" "@trampfnmhl{ssh, %h,}")) 1356 '("\\.your\\.domain\\'" "\\`root\\'" "@trampfn{ssh, , %h,}"))
1356@end lisp 1357@end lisp
1357 1358
1358Opening @file{@trampfnmhl{sudo, randomhost.your.domain,}} would 1359Opening @file{@trampfn{sudo, , randomhost.your.domain,}} would connect
1359connect first @samp{randomhost.your.domain} via @code{ssh} under your 1360first @samp{randomhost.your.domain} via @code{ssh} under your account
1360account name, and perform @code{sudo -u root} on that host afterwards. 1361name, and perform @code{sudo -u root} on that host afterwards. It is
1361It is important to know that the given method is applied on the host 1362important to know that the given method is applied on the host which
1362which has been reached so far. @code{sudo -u root}, applied on your 1363has been reached so far. @code{sudo -u root}, applied on your local
1363local host, wouldn't be useful here. 1364host, wouldn't be useful here.
1364 1365
1365This is the recommended configuration to work as @samp{root} on remote 1366This is the recommended configuration to work as @samp{root} on remote
1366Ubuntu hosts. 1367Ubuntu hosts.
@@ -1382,7 +1383,7 @@ following rule:
1382@lisp 1383@lisp
1383(add-to-list 'tramp-default-proxies-alist 1384(add-to-list 'tramp-default-proxies-alist
1384 '("\\`host\\.other\\.domain\\'" nil 1385 '("\\`host\\.other\\.domain\\'" nil
1385 "@trampfnmhl{tunnel, proxy.your.domain#3128,}")) 1386 "@trampfn{tunnel, , proxy.your.domain#3128,}"))
1386@end lisp 1387@end lisp
1387 1388
1388Gateway methods can be declared as first hop only in a multiple hop 1389Gateway methods can be declared as first hop only in a multiple hop
@@ -2029,32 +2030,32 @@ minute you have already forgotten that you hit that key!
2029@cindex filename examples 2030@cindex filename examples
2030 2031
2031To access the file @var{localname} on the remote machine @var{machine} 2032To access the file @var{localname} on the remote machine @var{machine}
2032you would specify the filename @file{@trampfnhl{@var{machine}, 2033you would specify the filename @file{@trampfn{, , @var{machine},
2033@var{localname}}}. This will connect to @var{machine} and transfer 2034@var{localname}}}. This will connect to @var{machine} and transfer
2034the file using the default method. @xref{Default Method}. 2035the file using the default method. @xref{Default Method}.
2035 2036
2036Some examples of @value{tramp} filenames are shown below. 2037Some examples of @value{tramp} filenames are shown below.
2037 2038
2038@table @file 2039@table @file
2039@item @trampfnhl{melancholia, .emacs} 2040@item @trampfn{, , melancholia, .emacs}
2040Edit the file @file{.emacs} in your home directory on the machine 2041Edit the file @file{.emacs} in your home directory on the machine
2041@code{melancholia}. 2042@code{melancholia}.
2042 2043
2043@item @trampfnhl{melancholia.danann.net, .emacs} 2044@item @trampfn{, , melancholia.danann.net, .emacs}
2044This edits the same file, using the fully qualified domain name of 2045This edits the same file, using the fully qualified domain name of
2045the machine. 2046the machine.
2046 2047
2047@item @trampfnhl{melancholia, ~/.emacs} 2048@item @trampfn{, , melancholia, ~/.emacs}
2048This also edits the same file --- the @file{~} is expanded to your 2049This also edits the same file --- the @file{~} is expanded to your
2049home directory on the remote machine, just like it is locally. 2050home directory on the remote machine, just like it is locally.
2050 2051
2051@item @trampfnhl{melancholia, ~daniel/.emacs} 2052@item @trampfn{, , melancholia, ~daniel/.emacs}
2052This edits the file @file{.emacs} in the home directory of the user 2053This edits the file @file{.emacs} in the home directory of the user
2053@code{daniel} on the machine @code{melancholia}. The @file{~<user>} 2054@code{daniel} on the machine @code{melancholia}. The @file{~<user>}
2054construct is expanded to the home directory of that user on the remote 2055construct is expanded to the home directory of that user on the remote
2055machine. 2056machine.
2056 2057
2057@item @trampfnhl{melancholia, /etc/squid.conf} 2058@item @trampfn{, , melancholia, /etc/squid.conf}
2058This edits the file @file{/etc/squid.conf} on the machine 2059This edits the file @file{/etc/squid.conf} on the machine
2059@code{melancholia}. 2060@code{melancholia}.
2060 2061
@@ -2066,10 +2067,10 @@ need to log in as a different user, you can specify the user name as
2066part of the filename. 2067part of the filename.
2067 2068
2068To log in to the remote machine as a specific user, you use the syntax 2069To log in to the remote machine as a specific user, you use the syntax
2069@file{@trampfnuhl{@var{user}, @var{machine}, @var{path/to.file}}}. 2070@file{@trampfn{, @var{user}, @var{machine}, @var{path/to.file}}}.
2070That means that connecting to @code{melancholia} as @code{daniel} and 2071That means that connecting to @code{melancholia} as @code{daniel} and
2071editing @file{.emacs} in your home directory you would specify 2072editing @file{.emacs} in your home directory you would specify
2072@file{@trampfnuhl{daniel, melancholia, .emacs}}. 2073@file{@trampfn{, daniel, melancholia, .emacs}}.
2073 2074
2074It is also possible to specify other file transfer methods 2075It is also possible to specify other file transfer methods
2075(@pxref{Default Method}) as part of the filename. 2076(@pxref{Default Method}) as part of the filename.
@@ -2160,11 +2161,11 @@ If you, for example, type @kbd{C-x C-f @value{prefix}t
2160 2161
2161@example 2162@example
2162@ifset emacs 2163@ifset emacs
2163@value{prefixhop}telnet@value{postfixhop} tmp/ 2164@value{prefixhop}telnet@value{postfixhop} tmp/
2164@value{prefixhop}toto@value{postfix} 2165@value{prefixhop}toto@value{postfix}
2165@end ifset 2166@end ifset
2166@ifset xemacs 2167@ifset xemacs
2167@value{prefixhop}telnet@value{postfixhop} @value{prefixhop}toto@value{postfix} 2168@value{prefixhop}telnet@value{postfixhop} @value{prefixhop}toto@value{postfix}
2168@end ifset 2169@end ifset
2169@end example 2170@end example
2170 2171
@@ -2184,9 +2185,9 @@ Next @kbd{@key{TAB}} brings you all machine names @value{tramp} detects in
2184your @file{/etc/hosts} file, let's say 2185your @file{/etc/hosts} file, let's say
2185 2186
2186@example 2187@example
2187@trampfnmhl{telnet,127.0.0.1,} @trampfnmhl{telnet,192.168.0.1,} 2188@trampfn{telnet, , 127.0.0.1,} @trampfn{telnet, , 192.168.0.1,}
2188@trampfnmhl{telnet,localhost,} @trampfnmhl{telnet,melancholia.danann.net,} 2189@trampfn{telnet, , localhost,} @trampfn{telnet, , melancholia.danann.net,}
2189@trampfnmhl{telnet,melancholia,} 2190@trampfn{telnet, , melancholia,}
2190@end example 2191@end example
2191 2192
2192Now you can choose the desired machine, and you can continue to 2193Now you can choose the desired machine, and you can continue to
@@ -2209,20 +2210,20 @@ that filename part starts with @file{//}.
2209@end ifinfo 2210@end ifinfo
2210 2211
2211@ifset emacs 2212@ifset emacs
2212As example, @kbd{@trampfnmhl{telnet,melancholia,/usr/local/bin//etc} 2213As example, @kbd{@trampfn{telnet, , melancholia, /usr/local/bin//etc}
2213@key{TAB}} would result in 2214@key{TAB}} would result in
2214@file{@trampfnmhl{telnet,melancholia,/etc}}, whereas 2215@file{@trampfn{telnet, , melancholia, /etc}}, whereas
2215@kbd{@trampfnmhl{telnet,melancholia,//etc} @key{TAB}} reduces the 2216@kbd{@trampfn{telnet, , melancholia, //etc} @key{TAB}} reduces the
2216minibuffer contents to @file{/etc}. A triple-slash stands for the 2217minibuffer contents to @file{/etc}. A triple-slash stands for the
2217default behaviour, 2218default behaviour,
2218i.e. @kbd{@trampfnmhl{telnet,melancholia,/usr/local/bin///etc} 2219i.e. @kbd{@trampfn{telnet, , melancholia, /usr/local/bin///etc}
2219@key{TAB}} expands directly to @file{/etc}. 2220@key{TAB}} expands directly to @file{/etc}.
2220@end ifset 2221@end ifset
2221 2222
2222@ifset xemacs 2223@ifset xemacs
2223As example, @kbd{@trampfnmhl{telnet,melancholia,/usr/local/bin//}} 2224As example, @kbd{@trampfn{telnet, , melancholia, /usr/local/bin//}}
2224would result in @file{@trampfnmhl{telnet,melancholia,/}}, whereas 2225would result in @file{@trampfn{telnet, , melancholia, /}}, whereas
2225@kbd{@trampfnmhl{telnet,melancholia,//}} expands the minibuffer 2226@kbd{@trampfn{telnet, , melancholia, //}} expands the minibuffer
2226contents to @file{/}. 2227contents to @file{/}.
2227@end ifset 2228@end ifset
2228 2229
@@ -2295,7 +2296,7 @@ After you have started @code{eshell}, you could perform commands like
2295this: 2296this:
2296 2297
2297@example 2298@example
2298@b{~ $} cd @trampfnmhl{sudo, , /etc} @key{RET} 2299@b{~ $} cd @trampfn{sudo, , , /etc} @key{RET}
2299@b{@trampfn{sudo, root, host, /etc} $} hostname @key{RET} 2300@b{@trampfn{sudo, root, host, /etc} $} hostname @key{RET}
2300host 2301host
2301@b{@trampfn{sudo, root, host, /etc} $} id @key{RET} 2302@b{@trampfn{sudo, root, host, /etc} $} id @key{RET}
@@ -2324,12 +2325,12 @@ remote hosts. You can call @code{gdb} with a remote file name:
2324 2325
2325@example 2326@example
2326@kbd{M-x gdb @key{RET}} 2327@kbd{M-x gdb @key{RET}}
2327@b{Run gdb (like this):} gdb --annotate=3 @trampfnmhl{ssh, host, ~/myprog} @key{RET} 2328@b{Run gdb (like this):} gdb --annotate=3 @trampfn{ssh, , host, ~/myprog} @key{RET}
2328@end example 2329@end example
2329 2330
2330The file name can also be relative to a remote default directory. 2331The file name can also be relative to a remote default directory.
2331Given you are in a buffer that belongs to the remote directory 2332Given you are in a buffer that belongs to the remote directory
2332@trampfnmhl{ssh, host, /home/user}, you could call 2333@trampfn{ssh, , host, /home/user}, you could call
2333 2334
2334@example 2335@example
2335@kbd{M-x perldb @key{RET}} 2336@kbd{M-x perldb @key{RET}}
@@ -2602,7 +2603,7 @@ remote host.
2602@item 2603@item
2603I'ld like to see a host indication in the mode line when I'm remote 2604I'ld like to see a host indication in the mode line when I'm remote
2604 2605
2605The following code has been tested with @value{emacsname} 22. You 2606The following code has been tested with @value{emacsname} 22.1. You
2606should put it into your @file{~/.emacs}: 2607should put it into your @file{~/.emacs}:
2607 2608
2608@lisp 2609@lisp
@@ -2610,13 +2611,13 @@ should put it into your @file{~/.emacs}:
2610 (list 2611 (list
2611 '(:eval 2612 '(:eval
2612 (let ((host-name 2613 (let ((host-name
2613 (if (file-remote-p default-directory) 2614 (if (file-remote-p default-directory)
2614 (tramp-file-name-host 2615 (tramp-file-name-host
2615 (tramp-dissect-file-name default-directory)) 2616 (tramp-dissect-file-name default-directory))
2616 (system-name)))) 2617 (system-name))))
2617 (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name) 2618 (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
2618 (substring host-name 0 (match-beginning 1)) 2619 (substring host-name 0 (match-beginning 1))
2619 host-name))) 2620 host-name)))
2620 ": %12b")) 2621 ": %12b"))
2621 2622
2622(setq-default 2623(setq-default
@@ -2630,6 +2631,18 @@ should put it into your @file{~/.emacs}:
2630 mode-line-buffer-identification 2631 mode-line-buffer-identification
2631 my-mode-line-buffer-identification))) 2632 my-mode-line-buffer-identification)))
2632@end lisp 2633@end lisp
2634
2635Since @value{emacsname} 23, the @code{:eval} clause can be simplified:
2636
2637@lisp
2638 '(:eval
2639 (let ((host-name
2640 (or (file-remote-p default-directory 'host)
2641 (system-name))))
2642 (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
2643 (substring host-name 0 (match-beginning 1))
2644 host-name)))
2645@end lisp
2633@end ifset 2646@end ifset
2634 2647
2635 2648
@@ -2693,11 +2706,11 @@ You can define default methods and user names for hosts,
2693@end lisp 2706@end lisp
2694 2707
2695The file name left to type would be 2708The file name left to type would be
2696@kbd{C-x C-f @trampfnhl{news.my.domain, /opt/news/etc}}. 2709@kbd{C-x C-f @trampfn{, , news.my.domain, /opt/news/etc}}.
2697 2710
2698Note, that there are some useful settings already. Accessing your 2711Note, that there are some useful settings already. Accessing your
2699local host as @samp{root} user, is possible just by @kbd{C-x C-f 2712local host as @samp{root} user, is possible just by @kbd{C-x C-f
2700@trampfnmhl{su,,}}. 2713@trampfn{su, , ,}}.
2701 2714
2702@item Use configuration possibilities of your method: 2715@item Use configuration possibilities of your method:
2703 2716
@@ -2711,7 +2724,7 @@ Host xy
2711 User news 2724 User news
2712@end example 2725@end example
2713 2726
2714The file name left to type would be @kbd{C-x C-f @trampfnmhl{ssh, xy, 2727The file name left to type would be @kbd{C-x C-f @trampfn{ssh, , xy,
2715/opt/news/etc}}. Depending on files in your directories, it is even 2728/opt/news/etc}}. Depending on files in your directories, it is even
2716possible to complete the hostname with @kbd{C-x C-f 2729possible to complete the hostname with @kbd{C-x C-f
2717@value{prefix}ssh@value{postfixhop}x @key{TAB}}. 2730@value{prefix}ssh@value{postfixhop}x @key{TAB}}.
@@ -2881,8 +2894,44 @@ C-@key{TAB}} in the minibuffer. The completion is done for the given
2881directory. 2894directory.
2882@end ifset 2895@end ifset
2883 2896
2897@ifset emacs
2898@item Use bbdb:
2899
2900@file{bbdb} has a built-in feature for @value{ftppackagename} files,
2901which works also for @value{tramp}.
2902@ifinfo
2903@pxref{bbdb-ftp, Storing FTP sites in the BBDB, , bbdb}
2904@end ifinfo
2905
2906You need to load @file{bbdb}:
2907
2908@lisp
2909(require 'bbdb)
2910(bbdb-initialize)
2911@end lisp
2912
2913Then you can create a BBDB entry via @kbd{M-x bbdb-create-ftp-site}.
2914Because BBDB is not prepared for @value{tramp} syntax, you must
2915specify a method together with the user name, when needed. Example:
2916
2917@example
2918@kbd{M-x bbdb-create-ftp-site @key{RET}}
2919@b{Ftp Site:} news.my.domain @key{RET}
2920@b{Ftp Directory:} /opt/news/etc/ @key{RET}
2921@b{Ftp Username:} ssh@value{postfixhop}news @key{RET}
2922@b{Company:} @key{RET}
2923@b{Additional Comments:} @key{RET}
2924@end example
2925
2926When you have opened your BBDB buffer, you can access such an entry by
2927pressing the key @key{F}.
2928@end ifset
2929
2884@end enumerate 2930@end enumerate
2885 2931
2932I would like to thank all @value{tramp} users, who have contributed to
2933the different recipes!
2934
2886 2935
2887@item 2936@item
2888How can I disable @value{tramp}? 2937How can I disable @value{tramp}?
diff --git a/man/trampver.texi b/man/trampver.texi
index 6d97869d115..877488c63e6 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -4,12 +4,12 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.1.10-pre 7@set trampver 2.1.10
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set instprefix /usr/local 10@set instprefix /usr/local
11@set lispdir /usr/local/share/emacs/site-lisp 11@set lispdir /usr/local/share/emacs/site-lisp
12@set infodir /usr/local/info 12@set infodir /usr/local/share/info
13 13
14@c Formatting of the tramp program name consistent. 14@c Formatting of the tramp program name consistent.
15@set tramp @sc{tramp} 15@set tramp @sc{tramp}