aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-01-24 11:40:26 -0800
committerPaul Eggert2016-01-24 11:40:58 -0800
commit3772f444228a07404c5af1fdf67a220025d37645 (patch)
treeba15debbd1bfec42ff3368a113dde3d1b8d92ef4
parent7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b (diff)
downloademacs-3772f444228a07404c5af1fdf67a220025d37645.tar.gz
emacs-3772f444228a07404c5af1fdf67a220025d37645.zip
Port Tramp manual to latest Texinfo
Otherwise, 'make pdf' did not work (Bug#22416). * doc/misc/tramp.texi (xxx, yyy): Remove macros. (trampfn): Specialize to the case where METHOD is nonempty. The 2nd argument is now user@host, not 2nd user and 3rd host args. All uses changed. (trampf): New macro.
-rw-r--r--doc/misc/tramp.texi214
1 files changed, 90 insertions, 124 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index eafd2385a5e..1b2b89e8e4e 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -18,52 +18,21 @@
18@include trampver.texi 18@include trampver.texi
19 19
20@c Macro for formatting a file name according to the respective syntax. 20@c Macro for formatting a file name according to the respective syntax.
21@c xxx and yyy are auxiliary macros in order to omit leading and 21@c Macro arguments should not have any leading or
22@c trailing whitespace. Not very elegant, but I don't know it better. 22@c trailing whitespace. Not very elegant, but I don't know it better.
23 23
24@c There are subtle differences between texinfo 4.13 and 5.0. We must 24@macro trampfn {method, userhost, localname}
25@c declare two versions of the macro. This will be improved, hopefully.
26
27@c Texinfo 5.0.
28@ifset txicommandconditionals
29@macro xxx {one}
30@set \one\
31@end macro
32
33@macro yyy {one, two}
34@xxx{x\one\}@c
35@ifclear x
36\one\@w{}\two\@c
37@end ifclear
38@clear x\one\
39@end macro
40
41@macro trampfn {method, user, host, localname}
42@value{prefix}@c 25@value{prefix}@c
43@yyy{\method\,@value{postfixhop}}@c 26\method\@value{postfixhop}@c
44@yyy{\user\,@@}@c 27\userhost\@value{postfix}\localname\
45\host\@value{postfix}\localname\
46@end macro 28@end macro
47@end ifset
48 29
49@c Texinfo 4.13. 30@c Similar, but without a method prefix.
50@ifclear txicommandconditionals
51@macro xxx {one}@c
52@set \one\@c
53@end macro
54
55@macro yyy {one, two}@c
56@xxx{x\one\}@c
57@ifclear x@c
58\one\@w{}\two\@c
59@end ifclear
60@clear x\one\@c
61@end macro
62 31
63@macro trampfn {method, user, host, localname}@c 32@macro trampf {userhost, localname}
64@value{prefix}@yyy{\method\,@value{postfixhop}}@yyy{\user\,@@}\host\@value{postfix}\localname\@c 33@value{prefix}@c
34\userhost\@value{postfix}\localname\
65@end macro 35@end macro
66@end ifclear
67 36
68@copying 37@copying
69Copyright @copyright{} 1999--2016 Free Software Foundation, Inc. 38Copyright @copyright{} 1999--2016 Free Software Foundation, Inc.
@@ -499,7 +468,7 @@ In December 2001, XEmacs package repository adds @value{tramp}.
499 468
500@value{tramp} is initially configured to use the @command{scp} program 469@value{tramp} is initially configured to use the @command{scp} program
501to connect to the remote host. Just type @kbd{C-x C-f} and then enter 470to connect to the remote host. Just type @kbd{C-x C-f} and then enter
502file name @file{@trampfn{, user, host, /path/to.file}}. For details, 471file name @file{@trampf{user@@host,/path/to.file}}. For details,
503see @xref{Default Method}. 472see @xref{Default Method}.
504 473
505For problems related to the behavior of remote shell, see @ref{Remote 474For problems related to the behavior of remote shell, see @ref{Remote
@@ -913,7 +882,7 @@ authorization, @value{tramp} provides for an extended syntax in
913percent symbol, and domain is the windows domain name). An example: 882percent symbol, and domain is the windows domain name). An example:
914 883
915@example 884@example
916@trampfn{smb, daniel%BIZARRE, melancholia, /daniel$$/.emacs} 885@trampfn{smb,daniel%BIZARRE@@melancholia,/daniel$$/.emacs}
917@end example 886@end example
918 887
919where user @code{daniel} connects as a domain user to the SMB host 888where user @code{daniel} connects as a domain user to the SMB host
@@ -925,7 +894,7 @@ substitute the domain name with the name of the local host in
925UPPERCASE as shown here: 894UPPERCASE as shown here:
926 895
927@example 896@example
928@trampfn{smb, daniel%MELANCHOLIA, melancholia, /daniel$$/.emacs} 897@trampfn{smb,daniel%MELANCHOLIA@@melancholia,/daniel$$/.emacs}
929@end example 898@end example
930 899
931where user @code{daniel} connects as local user to the SMB host 900where user @code{daniel} connects as local user to the SMB host
@@ -969,7 +938,7 @@ the custom option @option{tramp-adb-connect-if-not-connected} is not
969 938
970@value{tramp} does not require a host name part of the remote file 939@value{tramp} does not require a host name part of the remote file
971name when a single Android device is connected to @command{adb}. 940name when a single Android device is connected to @command{adb}.
972@value{tramp} instead uses @file{@trampfn{adb, , ,}} as the default 941@value{tramp} instead uses @file{@trampfn{adb,,}} as the default
973name. @command{adb devices} shows available host names. 942name. @command{adb devices} shows available host names.
974 943
975@option{adb} method normally does not need user name to authenticate 944@option{adb} method normally does not need user name to authenticate
@@ -1011,7 +980,7 @@ active, @pxref{Top, , D-Bus, dbus}.
1011This method is for connecting to remote hosts with the Apple Filing 980This method is for connecting to remote hosts with the Apple Filing
1012Protocol for accessing files on Mac OS X volumes. @value{tramp} access 981Protocol for accessing files on Mac OS X volumes. @value{tramp} access
1013syntax requires a leading volume (share) name, for example: 982syntax requires a leading volume (share) name, for example:
1014@file{@trampfn{afp, user, host, /volume}}. 983@file{@trampfn{afp,user@@host,/volume}}.
1015 984
1016@item @option{dav} 985@item @option{dav}
1017@item @option{davs} 986@item @option{davs}
@@ -1179,7 +1148,7 @@ access and it has the most reasonable security protocols, use
1179@file{/etc/motd} file on the otherhost: 1148@file{/etc/motd} file on the otherhost:
1180 1149
1181@example 1150@example
1182@kbd{C-x C-f @trampfn{ssh, root, otherhost,/etc/motd} @key{RET}} 1151@kbd{C-x C-f @trampfn{ssh,root@@otherhost,/etc/motd} @key{RET}}
1183@end example 1152@end example
1184 1153
1185If @option{ssh} is unavailable for whatever reason, look for other 1154If @option{ssh} is unavailable for whatever reason, look for other
@@ -1190,7 +1159,7 @@ For editing local files as @option{su} or @option{sudo} methods, try
1190the shortened syntax of @samp{root}: 1159the shortened syntax of @samp{root}:
1191 1160
1192@example 1161@example
1193@kbd{C-x C-f @trampfn{su, , , /etc/motd} @key{RET}} 1162@kbd{C-x C-f @trampfn{su,,/etc/motd} @key{RET}}
1194@end example 1163@end example
1195 1164
1196For editing large files, @option{scp} is faster than @option{ssh}. 1165For editing large files, @option{scp} is faster than @option{ssh}.
@@ -1263,7 +1232,7 @@ default user and default host can be overridden as follows:
1263 tramp-default-host "target") 1232 tramp-default-host "target")
1264@end lisp 1233@end lisp
1265 1234
1266With both defaults set, @samp{@trampfn{ssh, , ,}} will connect 1235With both defaults set, @samp{@trampfn{ssh,,}} will connect
1267@value{tramp} to John's home directory on target. 1236@value{tramp} to John's home directory on target.
1268 1237
1269@ifset emacs 1238@ifset emacs
@@ -1323,7 +1292,7 @@ user @samp{bird} to reach remote hosts outside the local domain:
1323 1292
1324@lisp 1293@lisp
1325(add-to-list 'tramp-default-proxies-alist 1294(add-to-list 'tramp-default-proxies-alist
1326 '("\\." nil "@trampfn{ssh, bird, bastion.your.domain,}")) 1295 '("\\." nil "@trampfn{ssh,bird@@bastion.your.domain,}"))
1327(add-to-list 'tramp-default-proxies-alist 1296(add-to-list 'tramp-default-proxies-alist
1328 '("\\.your\\.domain\\'" nil nil)) 1297 '("\\.your\\.domain\\'" nil nil))
1329@end lisp 1298@end lisp
@@ -1339,7 +1308,7 @@ connect to @samp{bastion.your.domain}, then:
1339(add-to-list 'tramp-default-proxies-alist 1308(add-to-list 'tramp-default-proxies-alist
1340 '("\\`bastion\\.your\\.domain\\'" 1309 '("\\`bastion\\.your\\.domain\\'"
1341 "\\`bird\\'" 1310 "\\`bird\\'"
1342 "@trampfn{ssh, , jump.your.domain,}")) 1311 "@trampfn{ssh,jump.your.domain,}"))
1343@end lisp 1312@end lisp
1344 1313
1345@var{proxy} can take patterns @code{%h} or @code{%u} for @var{host} or 1314@var{proxy} can take patterns @code{%h} or @code{%u} for @var{host} or
@@ -1351,10 +1320,10 @@ access, then use this alist entry:
1351 1320
1352@lisp 1321@lisp
1353(add-to-list 'tramp-default-proxies-alist 1322(add-to-list 'tramp-default-proxies-alist
1354 '("\\.your\\.domain\\'" "\\`root\\'" "@trampfn{ssh, , %h,}")) 1323 '("\\.your\\.domain\\'" "\\`root\\'" "@trampfn{ssh,%h,}"))
1355@end lisp 1324@end lisp
1356 1325
1357Opening @file{@trampfn{sudo, , randomhost.your.domain,}} first 1326Opening @file{@trampfn{sudo,randomhost.your.domain,}} first
1358connects to @samp{randomhost.your.domain} via @code{ssh} under your 1327connects to @samp{randomhost.your.domain} via @code{ssh} under your
1359account name, and then perform @code{sudo -u root} on that host. 1328account name, and then perform @code{sudo -u root} on that host.
1360 1329
@@ -1370,7 +1339,7 @@ local one, first connect via @command{ssh}, and then apply
1370 1339
1371@lisp 1340@lisp
1372(add-to-list 'tramp-default-proxies-alist 1341(add-to-list 'tramp-default-proxies-alist
1373 '(nil "\\`root\\'" "@trampfn{ssh, , %h,}")) 1342 '(nil "\\`root\\'" "@trampfn{ssh,%h,}"))
1374(add-to-list 'tramp-default-proxies-alist 1343(add-to-list 'tramp-default-proxies-alist
1375 '((regexp-quote (system-name)) nil nil)) 1344 '((regexp-quote (system-name)) nil nil))
1376@end lisp 1345@end lisp
@@ -1395,7 +1364,7 @@ discussion of ethical issues.} Then the configuration is:
1395@lisp 1364@lisp
1396(add-to-list 'tramp-default-proxies-alist 1365(add-to-list 'tramp-default-proxies-alist
1397 '("\\`host\\.other\\.domain\\'" nil 1366 '("\\`host\\.other\\.domain\\'" nil
1398 "@trampfn{tunnel, , proxy.your.domain#3128,}")) 1367 "@trampfn{tunnel,proxy.your.domain#3128,}"))
1399@end lisp 1368@end lisp
1400 1369
1401Gateway methods in a multiple hop chain can be declared only as the first hop. 1370Gateway methods in a multiple hop chain can be declared only as the first hop.
@@ -1647,8 +1616,7 @@ cases, two different connections may result in the same persistent
1647information. For example, connecting to a host using @command{ssh} and 1616information. For example, connecting to a host using @command{ssh} and
1648connecting to the same host through @code{sshd} on port 3001. Both 1617connecting to the same host through @code{sshd} on port 3001. Both
1649access methods result in nearly identical persistent specifications 1618access methods result in nearly identical persistent specifications
1650@file{@trampfn{ssh, , localhost,}} and @file{@trampfn{ssh, , 1619@file{@trampfn{ssh,localhost,}} and @file{@trampfn{ssh,localhost#3001,}}.
1651localhost#3001,}}.
1652 1620
1653Changing host names could avoid duplicates. One way is to add a 1621Changing host names could avoid duplicates. One way is to add a
1654@option{Host} section in @file{~/.ssh/config} (@pxref{Frequently Asked 1622@option{Host} section in @file{~/.ssh/config} (@pxref{Frequently Asked
@@ -1680,10 +1648,10 @@ remote shell:
1680 1648
1681@lisp 1649@lisp
1682(add-to-list 'tramp-connection-properties 1650(add-to-list 'tramp-connection-properties
1683 (list (regexp-quote "@trampfn{ssh, user, randomhost.your.domain,}") 1651 (list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}")
1684 "remote-shell" "/bin/ksh")) 1652 "remote-shell" "/bin/ksh"))
1685(add-to-list 'tramp-connection-properties 1653(add-to-list 'tramp-connection-properties
1686 (list (regexp-quote "@trampfn{ssh, user, randomhost.your.domain,}") 1654 (list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}")
1687 "remote-shell-login" '("-"))) 1655 "remote-shell-login" '("-")))
1688@end lisp 1656@end lisp
1689 1657
@@ -1699,7 +1667,7 @@ special property @samp{busybox}. For example:
1699 1667
1700@lisp 1668@lisp
1701(add-to-list 'tramp-connection-properties 1669(add-to-list 'tramp-connection-properties
1702 (list (regexp-quote "@trampfn{ssh, user, randomhost.your.domain,}") 1670 (list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}")
1703 "busybox" t)) 1671 "busybox" t))
1704@end lisp 1672@end lisp
1705 1673
@@ -2002,8 +1970,8 @@ directory for temporary files:
2002@end lisp 1970@end lisp
2003 1971
2004@noindent 1972@noindent
2005Open a remote connection with the command @kbd{C-x C-f @trampfn{ssh, , 1973Open a remote connection with the command @kbd{C-x C-f
2006192.168.0.26#2222, }}, where @command{sshd} is listening on port 1974@trampfn{ssh,192.168.0.26#2222,}}, where @command{sshd} is listening on port
2007@samp{2222}. 1975@samp{2222}.
2008 1976
2009To add a corresponding entry to the @file{~/.ssh/config} file 1977To add a corresponding entry to the @file{~/.ssh/config} file
@@ -2027,7 +1995,7 @@ the previous example, fix the connection properties as follows:
2027 1995
2028@noindent 1996@noindent
2029Open a remote connection with a more concise command @kbd{C-x C-f 1997Open a remote connection with a more concise command @kbd{C-x C-f
2030@trampfn{ssh, , android, }}. 1998@trampfn{ssh,android,}}.
2031 1999
2032 2000
2033@node Auto-save and Backup 2001@node Auto-save and Backup
@@ -2056,7 +2024,7 @@ exposed. @value{emacsname} by default writes backup files to the same
2056directory as the original files unless changed to another location, 2024directory as the original files unless changed to another location,
2057such as @file{~/.emacs.d/backups/}. Such a directory will also be used 2025such as @file{~/.emacs.d/backups/}. Such a directory will also be used
2058by default by @value{tramp} when using, say, a restricted file 2026by default by @value{tramp} when using, say, a restricted file
2059@file{@trampfn{su, root, localhost, /etc/secretfile}}. The backup file 2027@file{@trampfn{su,root@@localhost,/etc/secretfile}}. The backup file
2060of the secretfile is now owned by the user logged in from tramp and 2028of the secretfile is now owned by the user logged in from tramp and
2061not root. 2029not root.
2062 2030
@@ -2145,15 +2113,13 @@ Example:
2145@end ifset 2113@end ifset
2146 2114
2147@noindent 2115@noindent
2148The backup file name of @file{@trampfn{su, root, localhost, 2116The backup file name of
2149/etc/secretfile}} would be 2117@file{@trampfn{su,root@@localhost,/etc/secretfile}} would be
2150@ifset emacs 2118@ifset emacs
2151@file{@trampfn{su, root, localhost, 2119@file{@trampfn{su,root@@localhost,~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile~}}
2152~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile~}}
2153@end ifset 2120@end ifset
2154@ifset xemacs 2121@ifset xemacs
2155@file{@trampfn{su, root, localhost, 2122@file{@trampfn{su,root@@localhost,~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}}
2156~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}}
2157@end ifset 2123@end ifset
2158 2124
2159Just as for backup files, similar issues of file naming affect 2125Just as for backup files, similar issues of file naming affect
@@ -2263,7 +2229,7 @@ passwords or authentication appear in the minibuffer. Hitting
2263@cindex file name syntax 2229@cindex file name syntax
2264@cindex file name examples 2230@cindex file name examples
2265 2231
2266@file{@trampfn{, , host, localfilename}} 2232@file{@trampf{host,localfilename}}
2267opens file @var{localfilename} on the remote host @var{host}, using 2233opens file @var{localfilename} on the remote host @var{host}, using
2268the default method. @xref{Default Method}. 2234the default method. @xref{Default Method}.
2269 2235
@@ -2289,9 +2255,9 @@ For the file @file{/etc/squid.conf} on the host @code{melancholia}.
2289 2255
2290@end table 2256@end table
2291 2257
2292@var{host} can take IPv4 or IPv6 address, as in @file{@trampfn{, , 2258@var{host} can take IPv4 or IPv6 address, as in
2293127.0.0.1, .emacs}} or @file{@trampfn{, , 2259@file{@trampf{127.0.0.1,.emacs}} or
2294@value{ipv6prefix}::1@value{ipv6postfix}, .emacs}}. 2260@file{@trampf{@value{ipv6prefix}::1@value{ipv6postfix},.emacs}}.
2295@ifset emacs 2261@ifset emacs
2296For syntactical reasons, IPv6 addresses must be embedded in square 2262For syntactical reasons, IPv6 addresses must be embedded in square
2297brackets @file{@value{ipv6prefix}} and @file{@value{ipv6postfix}}. 2263brackets @file{@value{ipv6prefix}} and @file{@value{ipv6postfix}}.
@@ -2302,10 +2268,10 @@ remote user name for log in to the remote host. Specifying a different
2302name using the proper syntax will override this default behavior: 2268name using the proper syntax will override this default behavior:
2303 2269
2304@example 2270@example
2305@trampfn{, user, host, path/to.file} 2271@trampf{user@@host,path/to.file}
2306@end example 2272@end example
2307 2273
2308@file{@trampfn{, daniel, melancholia, .emacs}} is for file 2274@file{@trampf{daniel@@melancholia,.emacs}} is for file
2309@file{.emacs} in @code{daniel}'s home directory on the host, 2275@file{.emacs} in @code{daniel}'s home directory on the host,
2310@code{melancholia}. 2276@code{melancholia}.
2311 2277
@@ -2326,15 +2292,14 @@ The syntax specifications for user, host, and file do not change.
2326 2292
2327To connect to the host @code{melancholia} as @code{daniel}, using 2293To connect to the host @code{melancholia} as @code{daniel}, using
2328@option{ssh} method for @file{.emacs} in @code{daniel}'s home 2294@option{ssh} method for @file{.emacs} in @code{daniel}'s home
2329directory, the full specification is: @file{@trampfn{ssh, daniel, 2295directory, the full specification is:
2330melancholia, .emacs}}. 2296@file{@trampfn{ssh,daniel@@melancholia,.emacs}}.
2331 2297
2332A remote file name containing a host name, which is the same string as 2298A remote file name containing a host name, which is the same string as
2333a method name, is not allowed. 2299a method name, is not allowed.
2334 2300
2335For specifying port numbers, affix @file{#<port>} to the host 2301For specifying port numbers, affix @file{#<port>} to the host
2336name. For example: @file{@trampfn{ssh, daniel, melancholia#42, 2302name. For example: @file{@trampfn{ssh,daniel@@melancholia#42,.emacs}}.
2337.emacs}}.
2338 2303
2339 2304
2340@node File name completion 2305@node File name completion
@@ -2355,7 +2320,7 @@ For example, type @kbd{C-x C-f @value{prefix}t @key{TAB}},
2355@value{tramp} completion choices show up as 2320@value{tramp} completion choices show up as
2356 2321
2357@example 2322@example
2358@c @multitable {@trampfn{telnet, , melancholia.danann.net,}} {@trampfn{telnet, , 192.168.0.1,}} 2323@c @multitable {@trampfn{telnet,melancholia.danann.net,}} {@trampfn{telnet,192.168.0.1,}}
2359@multitable @columnfractions .5 .5 2324@multitable @columnfractions .5 .5
2360@ifset emacs 2325@ifset emacs
2361@item @value{prefixhop}telnet@value{postfixhop} @tab tmp/ 2326@item @value{prefixhop}telnet@value{postfixhop} @tab tmp/
@@ -2382,10 +2347,11 @@ shows host names @value{tramp} from @file{/etc/hosts} file, for example.
2382 2347
2383@example 2348@example
2384@multitable @columnfractions .5 .5 2349@multitable @columnfractions .5 .5
2385@c @multitable {@trampfn{telnet, , melancholia.danann.net,}} {@trampfn{telnet, , 192.168.0.1,}} 2350@c @multitable {@trampfn{telnet,melancholia.danann.net,}} {@trampfn{telnet,192.168.0.1,}}
2386@item @trampfn{telnet, , 127.0.0.1,} @tab @trampfn{telnet, , 192.168.0.1,} 2351@item @trampfn{telnet,127.0.0.1,} @tab @trampfn{telnet,192.168.0.1,}
2387@item @trampfn{telnet, , @value{ipv6prefix}::1@value{ipv6postfix},} @tab @trampfn{telnet, , localhost,} 2352@c @item @trampfn{telnet,@value{ipv6prefix}::1@value{ipv6postfix},} @tab @trampfn{telnet,localhost,}
2388@item @trampfn{telnet, , melancholia.danann.net,} @tab @trampfn{telnet, , melancholia,} 2353@item @value{prefix}telnet@value{postfixhop}@value{ipv6prefix}::1@value{ipv6postfix}@value{postfix} @tab @trampfn{telnet,localhost,}
2354@item @trampfn{telnet,melancholia.danann.net,} @tab @trampfn{telnet,melancholia,}
2389@end multitable 2355@end multitable
2390@end example 2356@end example
2391 2357
@@ -2415,21 +2381,21 @@ Example:
2415 2381
2416@example 2382@example
2417@ifset emacs 2383@ifset emacs
2418@kbd{C-x C-f @trampfn{telnet, , melancholia, /usr/local/bin//etc} @key{TAB}} 2384@kbd{C-x C-f @trampfn{telnet,melancholia,/usr/local/bin//etc} @key{TAB}}
2419 @print{} @trampfn{telnet, , melancholia, /etc} 2385 @print{} @trampfn{telnet,melancholia,/etc}
2420 2386
2421@kbd{C-x C-f @trampfn{telnet, , melancholia, //etc} @key{TAB}} 2387@kbd{C-x C-f @trampfn{telnet,melancholia,//etc} @key{TAB}}
2422 @print{} /etc 2388 @print{} /etc
2423 2389
2424@kbd{C-x C-f @trampfn{telnet, , melancholia, /usr/local/bin///etc} @key{TAB}} 2390@kbd{C-x C-f @trampfn{telnet,melancholia,/usr/local/bin///etc} @key{TAB}}
2425 @print{} /etc 2391 @print{} /etc
2426@end ifset 2392@end ifset
2427 2393
2428@ifset xemacs 2394@ifset xemacs
2429@kbd{C-x C-f @trampfn{telnet, , melancholia, /usr/local/bin//}} 2395@kbd{C-x C-f @trampfn{telnet,melancholia,/usr/local/bin//}}
2430 @print{} @trampfn{telnet, , melancholia, /} 2396 @print{} @trampfn{telnet,melancholia,/}
2431 2397
2432@kbd{C-x C-f @trampfn{telnet, , melancholia, //}} 2398@kbd{C-x C-f @trampfn{telnet,melancholia,//}}
2433 @print{} / 2399 @print{} /
2434@end ifset 2400@end ifset
2435@end example 2401@end example
@@ -2464,8 +2430,7 @@ remote host name and file name. For example, hopping over a single
2464proxy @samp{bird@@bastion} to a remote file on @samp{you@@remotehost}: 2430proxy @samp{bird@@bastion} to a remote file on @samp{you@@remotehost}:
2465 2431
2466@example 2432@example
2467@c @kbd{C-x C-f @trampfn{ssh@value{postfixhop}bird@@bastion|ssh, you, 2433@c @kbd{C-x C-f @trampfn{ssh@value{postfixhop}bird@@bastion|ssh,you,remotehost,/path}}
2468@c remotehost, /path}}
2469@kbd{C-x C-f @value{prefix}ssh@value{postfixhop}bird@@bastion|ssh@value{postfixhop}you@@remotehost@value{postfix}/path} 2434@kbd{C-x C-f @value{prefix}ssh@value{postfixhop}bird@@bastion|ssh@value{postfixhop}you@@remotehost@value{postfix}/path}
2470@end example 2435@end example
2471 2436
@@ -2475,7 +2440,7 @@ Proxies can take patterns @code{%h} or @code{%u}.
2475@code{tramp-default-proxies-alist} and is available for re-use during 2440@code{tramp-default-proxies-alist} and is available for re-use during
2476that @value{emacsname} session. Subsequent @value{tramp} connections 2441that @value{emacsname} session. Subsequent @value{tramp} connections
2477to the same remote host can then use the shortcut form: 2442to the same remote host can then use the shortcut form:
2478@samp{@trampfn{ssh, you, remotehost, /path}}. 2443@samp{@trampfn{ssh,you@@remotehost,/path}}.
2479 2444
2480@defopt tramp-save-ad-hoc-proxies 2445@defopt tramp-save-ad-hoc-proxies
2481@vindex tramp-save-ad-hoc-proxies 2446@vindex tramp-save-ad-hoc-proxies
@@ -2631,7 +2596,7 @@ on remote hosts and displays output in buffers on the local
2631host. Example: 2596host. Example:
2632 2597
2633@example 2598@example
2634@kbd{C-x C-f @trampfn{sudo, , , } @key{RET}} 2599@kbd{C-x C-f @trampfn{sudo,,} @key{RET}}
2635@kbd{M-! tail -f /var/log/syslog.log & @key{RET}} 2600@kbd{M-! tail -f /var/log/syslog.log & @key{RET}}
2636@end example 2601@end example
2637 2602
@@ -2653,14 +2618,14 @@ You must add the module @code{eshell-tramp} to
2653@kbd{M-x eshell} on a remote host: 2618@kbd{M-x eshell} on a remote host:
2654 2619
2655@example 2620@example
2656@b{~ $} cd @trampfn{sudo, , , /etc} @key{RET} 2621@b{~ $} cd @trampfn{sudo,,/etc} @key{RET}
2657@b{@trampfn{sudo, root, host, /etc} $} hostname @key{RET} 2622@b{@trampfn{sudo,root@@host,/etc} $} hostname @key{RET}
2658host 2623host
2659@b{@trampfn{sudo, root, host, /etc} $} id @key{RET} 2624@b{@trampfn{sudo,root@@host,/etc} $} id @key{RET}
2660uid=0(root) gid=0(root) groups=0(root) 2625uid=0(root) gid=0(root) groups=0(root)
2661@b{@trampfn{sudo, root, host, /etc} $} find-file shadow @key{RET} 2626@b{@trampfn{sudo,root@@host,/etc} $} find-file shadow @key{RET}
2662#<buffer shadow> 2627#<buffer shadow>
2663@b{@trampfn{sudo, root, host, /etc} $} 2628@b{@trampfn{sudo,root@@host,/etc} $}
2664@end example 2629@end example
2665 2630
2666@ifset emacs 2631@ifset emacs
@@ -2671,16 +2636,16 @@ uid=0(root) gid=0(root) groups=0(root)
2671(@pxref{Multi-hops}): 2636(@pxref{Multi-hops}):
2672 2637
2673@example 2638@example
2674@b{~ $} cd @trampfn{ssh, user, remotehost, /etc} @key{RET} 2639@b{~ $} cd @trampfn{ssh,user@@remotehost,/etc} @key{RET}
2675@b{@trampfn{ssh, user, remotehost, /etc} $} find-file shadow @key{RET} 2640@b{@trampfn{ssh,user@@remotehost,/etc} $} find-file shadow @key{RET}
2676File is not readable: @trampfn{ssh, user, remotehost, /etc/shadow} 2641File is not readable: @trampfn{ssh,user@@remotehost,/etc/shadow}
2677@b{@trampfn{ssh, user, remotehost, /etc} $} sudo find-file shadow @key{RET} 2642@b{@trampfn{ssh,user@@remotehost,/etc} $} sudo find-file shadow @key{RET}
2678#<buffer shadow> 2643#<buffer shadow>
2679 2644
2680@b{@trampfn{ssh, user, remotehost, /etc} $} su - @key{RET} 2645@b{@trampfn{ssh,user@@remotehost,/etc} $} su - @key{RET}
2681@b{@trampfn{su, root, remotehost, /root} $} id @key{RET} 2646@b{@trampfn{su,root@@remotehost,/root} $} id @key{RET}
2682uid=0(root) gid=0(root) groups=0(root) 2647uid=0(root) gid=0(root) groups=0(root)
2683@b{@trampfn{su, root, remotehost, /root} $} 2648@b{@trampfn{su,root@@remotehost,/root} $}
2684@end example 2649@end example
2685@end ifset 2650@end ifset
2686 2651
@@ -2702,11 +2667,11 @@ with a remote file name:
2702 2667
2703@example 2668@example
2704@kbd{M-x gdb @key{RET}} 2669@kbd{M-x gdb @key{RET}}
2705@b{Run gdb (like this):} gdb --annotate=3 @trampfn{ssh, , host, ~/myprog} @key{RET} 2670@b{Run gdb (like this):} gdb --annotate=3 @trampfn{ssh,host,~/myprog} @key{RET}
2706@end example 2671@end example
2707 2672
2708Relative file names are based on the remote default directory. When 2673Relative file names are based on the remote default directory. When
2709@file{myprog.pl} exists in @file{@trampfn{ssh, , host, /home/user}}, 2674@file{myprog.pl} exists in @file{@trampfn{ssh,host,/home/user}},
2710valid calls include: 2675valid calls include:
2711 2676
2712@example 2677@example
@@ -2761,8 +2726,9 @@ To open @command{powershell} as a remote shell, use this:
2761This command flushes all connection related objects. @option{vec} is 2726This command flushes all connection related objects. @option{vec} is
2762the internal representation of a remote connection. When called 2727the internal representation of a remote connection. When called
2763interactively, this command lists active remote connections in the 2728interactively, this command lists active remote connections in the
2764minibuffer. Each connection is of the format @file{@trampfn{method, 2729minibuffer. Each connection is of the format
2765user, host, }}. Flushing remote connections also cleans the password 2730@file{@trampfn{method,user@@host,}}. Flushing remote connections also
2731cleans the password
2766cache (@pxref{Password handling}), file cache, connection cache 2732cache (@pxref{Password handling}), file cache, connection cache
2767(@pxref{Connection caching}), and connection buffers. 2733(@pxref{Connection caching}), and connection buffers.
2768@end deffn 2734@end deffn
@@ -3226,7 +3192,7 @@ HISTFILE=/dev/null
3226How to shorten long file names when typing in @value{tramp}? 3192How to shorten long file names when typing in @value{tramp}?
3227 3193
3228Adapt several of these approaches to reduce typing. If the full name 3194Adapt several of these approaches to reduce typing. If the full name
3229is @file{@trampfn{ssh, news, news.my.domain, /opt/news/etc}}, then: 3195is @file{@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, then:
3230 3196
3231@enumerate 3197@enumerate
3232 3198
@@ -3241,11 +3207,11 @@ You can define default methods and user names for hosts,
3241 tramp-default-user "news") 3207 tramp-default-user "news")
3242@end lisp 3208@end lisp
3243 3209
3244The reduced typing: @kbd{C-x C-f @trampfn{, , news.my.domain, /opt/news/etc}}. 3210The reduced typing: @kbd{C-x C-f @trampf{news.my.domain,/opt/news/etc}}.
3245 3211
3246@strong{Note} that there are some useful shortcuts already. Accessing 3212@strong{Note} that there are some useful shortcuts already. Accessing
3247your local host as @samp{root} user, is possible just by @kbd{C-x C-f 3213your local host as @samp{root} user, is possible just by @kbd{C-x C-f
3248@trampfn{su, , ,}}. 3214@trampfn{su,,}}.
3249 3215
3250@item 3216@item
3251Use configuration options of the access method: 3217Use configuration options of the access method:
@@ -3260,7 +3226,7 @@ Host xy
3260 User news 3226 User news
3261@end example 3227@end example
3262 3228
3263The reduced typing: @kbd{C-x C-f @trampfn{ssh, , xy, /opt/news/etc}}. 3229The reduced typing: @kbd{C-x C-f @trampfn{ssh,xy,/opt/news/etc}}.
3264 3230
3265Depending on the number of files in the directories, host names 3231Depending on the number of files in the directories, host names
3266completion can further reduce key strokes: @kbd{C-x C-f 3232completion can further reduce key strokes: @kbd{C-x C-f
@@ -3274,7 +3240,7 @@ the minibuffer. Environment variables are set either outside
3274@value{emacsname} or inside @value{emacsname} with Lisp: 3240@value{emacsname} or inside @value{emacsname} with Lisp:
3275 3241
3276@lisp 3242@lisp
3277(setenv "xy" "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}") 3243(setenv "xy" "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}")
3278@end lisp 3244@end lisp
3279 3245
3280The reduced typing: @kbd{C-x C-f $xy @key{RET}}. 3246The reduced typing: @kbd{C-x C-f $xy @key{RET}}.
@@ -3295,7 +3261,7 @@ Redefine another key sequence in @value{emacsname} for @kbd{C-x C-f}:
3295 (find-file 3261 (find-file
3296 (read-file-name 3262 (read-file-name
3297 "Find Tramp file: " 3263 "Find Tramp file: "
3298 "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")))) 3264 "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))))
3299@end lisp 3265@end lisp
3300 3266
3301Simply typing @kbd{C-x C-y} would prepare minibuffer editing of file 3267Simply typing @kbd{C-x C-y} would prepare minibuffer editing of file
@@ -3312,7 +3278,7 @@ Abbreviation list expansion can be used to reduce typing long file names:
3312@lisp 3278@lisp
3313(add-to-list 3279(add-to-list
3314 'directory-abbrev-alist 3280 'directory-abbrev-alist
3315 '("^/xy" . "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) 3281 '("^/xy" . "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))
3316@end lisp 3282@end lisp
3317 3283
3318The reduced typing: @kbd{C-x C-f /xy @key{RET}}. 3284The reduced typing: @kbd{C-x C-f /xy @key{RET}}.
@@ -3329,7 +3295,7 @@ minibuffer:
3329 3295
3330@lisp 3296@lisp
3331(define-abbrev-table 'my-tramp-abbrev-table 3297(define-abbrev-table 'my-tramp-abbrev-table
3332 '(("xy" "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}"))) 3298 '(("xy" "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}")))
3333 3299
3334(add-hook 3300(add-hook
3335 'minibuffer-setup-hook 3301 'minibuffer-setup-hook
@@ -3427,7 +3393,7 @@ directory to the cache:
3427@lisp 3393@lisp
3428(eval-after-load "filecache" 3394(eval-after-load "filecache"
3429 '(file-cache-add-directory 3395 '(file-cache-add-directory
3430 "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) 3396 "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))
3431@end lisp 3397@end lisp
3432 3398
3433Then use directory completion in the minibuffer with @kbd{C-x C-f 3399Then use directory completion in the minibuffer with @kbd{C-x C-f
@@ -3479,11 +3445,11 @@ multi-hops}) via bookmarks, recent files,
3479filecache, bbdb, 3445filecache, bbdb,
3480@end ifset 3446@end ifset
3481or another package, use the full ad-hoc file name including all hops, 3447or another package, use the full ad-hoc file name including all hops,
3482like @file{@trampfn{ssh, bird, 3448like
3483bastion|ssh@value{postfixhop}news.my.domain, /opt/news/etc}}. 3449@file{@trampfn{ssh,bird@@bastion|ssh@value{postfixhop}news.my.domain,/opt/news/etc}}.
3484 3450
3485Alternatively, when saving abbreviated multi-hop file names 3451Alternatively, when saving abbreviated multi-hop file names
3486@file{@trampfn{ssh, news, news.my.domain, /opt/news/etc}}, the custom 3452@file{@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, the custom
3487option @code{tramp-save-ad-hoc-proxies} must be set non-@code{nil} 3453option @code{tramp-save-ad-hoc-proxies} must be set non-@code{nil}
3488value. 3454value.
3489 3455
@@ -3516,7 +3482,7 @@ location.
3516Then start Emacs Client from the command line: 3482Then start Emacs Client from the command line:
3517 3483
3518@example 3484@example
3519emacsclient @trampfn{ssh, user, host, /file/to/edit} 3485emacsclient @trampfn{ssh,user@@host,/file/to/edit}
3520@end example 3486@end example
3521 3487
3522@code{user} and @code{host} refer to the local host. 3488@code{user} and @code{host} refer to the local host.
@@ -3526,7 +3492,7 @@ script @file{emacsclient.sh}:
3526 3492
3527@example 3493@example
3528#!/bin/sh 3494#!/bin/sh
3529emacsclient @trampfn{ssh, $(whoami), $(hostname --fqdn), $1} 3495emacsclient @trampfn{ssh,$(whoami)@@$(hostname --fqdn),$1}
3530@end example 3496@end example
3531 3497
3532Then change the environment variable @env{EDITOR} to point to the 3498Then change the environment variable @env{EDITOR} to point to the