[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 59720dc: Improve handling of defcustoms in tramp
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 59720dc: Improve handling of defcustoms in tramp |
Date: |
Sun, 14 Aug 2016 11:31:25 +0000 (UTC) |
branch: master
commit 59720dc1379bb0e0c4a78930fac7f48740780c80
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Improve handling of defcustoms in tramp
* doc/misc/tramp.texi: Protect all multi-line examples by
@group ... @end group. Use proper `custom-set-variables'
examples. Use consequently @option for user options. Remove
superfluous @cindex and @vindex entries.
(Top): Remove reference to outdated mail archives.
(Configuration): Tune references.
(Default Method): Make `tramp-default-method' and
`tramp-default-method-alist' a @defopt.
(Default User): Make `tramp-default-user' and
`tramp-default-user-alist' a @defopt.
(Default Host): Make `tramp-default-host' and
`tramp-default-host-alist' a @defopt.
* lisp/net/tramp.el (tramp-mode, tramp-verbose)
(tramp-backup-directory-alist, tramp-auto-save-directory)
(tramp-encoding-shell, tramp-encoding-command-switch)
(tramp-encoding-command-interactive, tramp-default-method)
(tramp-default-method-alist, tramp-default-user)
(tramp-default-user-alist, tramp-default-host)
(tramp-default-host-alist, tramp-default-proxies-alist)
(tramp-save-ad-hoc-proxies)
(tramp-restricted-shell-hosts-alist)
(tramp-local-end-of-line, tramp-rsh-end-of-line)
(tramp-login-prompt-regexp, tramp-shell-prompt-pattern)
(tramp-password-prompt-regexp, tramp-wrong-passwd-regexp)
(tramp-yesno-prompt-regexp, tramp-yn-prompt-regexp)
(tramp-terminal-prompt-regexp)
(tramp-operation-not-permitted-regexp)
(tramp-copy-failed-regexp, tramp-process-alive-regexp)
(tramp-syntax, tramp-chunksize)
(tramp-process-connection-type, tramp-connection-timeout)
(tramp-connection-min-time-diff)
(tramp-completion-reread-directory-timeout):
* lisp/net/tramp-adb.el (tramp-adb-program)
(tramp-adb-connect-if-not-connected, tramp-adb-prompt):
* lisp/net/tramp-cache.el (tramp-connection-properties)
(tramp-persistency-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods)
(tramp-gvfs-zeroconf-domain)
(tramp-bluez-discover-devices-timeout):
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
(tramp-copy-size-limit, tramp-terminal-type)
(tramp-histfile-override)
(tramp-use-ssh-controlmaster-options, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args):
* lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program)
(tramp-smb-conf, tramp-smb-winexe-program)
(tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch): Add :require 'tramp.
---
doc/misc/tramp.texi | 481 ++++++++++++++++++++++++++++++-----------------
lisp/net/tramp-adb.el | 9 +-
lisp/net/tramp-cache.el | 7 +-
lisp/net/tramp-gvfs.el | 9 +-
lisp/net/tramp-sh.el | 24 ++-
lisp/net/tramp-smb.el | 18 +-
lisp/net/tramp.el | 108 +++++++----
7 files changed, 429 insertions(+), 227 deletions(-)
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 3751828..3160ba3 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -12,9 +12,6 @@
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
address@hidden Additionally, flags are set with respect to the Emacs flavor; and
address@hidden depending whether Tramp is packaged into (X)Emacs, or standalone.
-
@include trampver.texi
@c Macro for formatting a file name according to the respective
@@ -69,9 +66,9 @@ copy and modify this GNU manual.''
@node Top, Overview, (dir), (dir)
address@hidden
@top @value{tramp} version @value{trampver} User Manual
address@hidden
This file documents @value{tramp} version @value{trampver}, a remote file
editing package for Emacs.
@@ -101,15 +98,6 @@ 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}.
address@hidden
-Older archives are located at
address@hidden://sourceforge.net/mailarchive/forum.php?forum=tramp-devel,
-SourceForge Mail Archive} and
address@hidden://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/,
-The Mail Archive}.
address@hidden in HTML output, there's no new paragraph.
address@hidden@*
address@hidden ifhtml
@insertcopying
@end ifnottex
@@ -356,16 +344,20 @@ navigation bar at the top.
Another way is to follow the terminal session below:
@example
address@hidden
] @strong{cd ~/emacs}
] @strong{git clone git://git.savannah.gnu.org/tramp.git}
address@hidden group
@end example
@noindent
From behind a firewall:
@example
address@hidden
] @strong{git config --global http.proxy
http://user:pwd@@proxy.server.com:8080}
] @strong{git clone http://git.savannah.gnu.org/r/tramp.git}
address@hidden group
@end example
@noindent
@@ -383,8 +375,10 @@ containing the latest version of @value{tramp}.
To fetch updates from the repository, use git pull:
@example
address@hidden
] @strong{cd ~/emacs/tramp}
] @strong{git pull}
address@hidden group
@end example
@noindent
@@ -392,8 +386,10 @@ Run @command{autoconf} as follows to generate an up-to-date
@file{configure} script:
@example
address@hidden
] @strong{cd ~/emacs/tramp}
] @strong{autoconf}
address@hidden group
@end example
@@ -434,22 +430,24 @@ XEmacs support has been stopped in January 2016.
@value{tramp} is initially configured to use the @command{scp} program
to connect to the remote host. Just type @kbd{C-x C-f} and then enter
-file name @address@hidden@@host,/path/to.file}}. For details, see
address@hidden Method}.
+file name @address@hidden@@host,/path/to.file}}. For details,
address@hidden Method}, @xref{Default User}, @xref{Default Host}.
-For problems related to the behavior of remote shell, see @ref{Remote
+For problems related to the behavior of remote shell, @xref{Remote
shell setup} for details.
For changing the connection type and file access method from the
-defaults to one of several other options, see (@pxref{Connection
-types}).
+defaults to one of several other options, @xref{Connection types}.
address@hidden that some user options and variables described in these
-examples are not auto loaded by Emacs. All examples require
address@hidden is installed and loaded:
address@hidden that some user options described in these examples are
+not auto loaded by Emacs. All examples require @value{tramp} is
+installed and loaded:
@lisp
-(require 'tramp)
address@hidden
+(custom-set-variables
+ '(tramp-verbose 6 nil (tramp) "Enable remote command traces"))
address@hidden group
@end lisp
@@ -491,11 +489,6 @@ they differ in the file access methods. Choosing the
right method
becomes important for editing files, transferring large files, or
operating on a large number of files.
address@hidden inline methods
address@hidden external methods
address@hidden methods, inline
address@hidden methods, external
-
The performance of the external methods is generally better 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.
@@ -544,8 +537,9 @@ unavailable, @value{tramp} first transfers a small Perl
program to the
remote host, and then tries that program for encoding and decoding.
To increase transfer speeds for large text files, use compression
-before encoding. The variable @var{tramp-inline-compress-start-size}
-specifies the file size for such optimization.
+before encoding. The user option
address@hidden specifies the file size for
+such optimization.
@table @asis
@item @option{rsh}
@@ -891,13 +885,13 @@ can.
This method uses Android Debug Bridge program for accessing Android
devices. The Android Debug Bridge must be installed locally for
@value{tramp} to work. Some GNU/Linux distributions provide Android
-Debug Bridge as an installation package. Alternatively, the program is
-installed as part of the Android address@hidden @value{tramp} finds the
+Debug Bridge as an installation package. Alternatively, the program
+is installed as part of the Android address@hidden @value{tramp} finds the
@command{adb} program either via the @env{PATH} environment variable
-or the absolute path set in the variable @var{tramp-adb-program}.
+or the absolute path set in the user option @option{tramp-adb-program}.
@value{tramp} connects to Android devices with @option{adb} only when
-the custom option @option{tramp-adb-connect-if-not-connected} is not
+the user option @option{tramp-adb-connect-if-not-connected} is not
@code{nil}. Otherwise, the connection must be established outside
Emacs.
@@ -999,9 +993,8 @@ requires the SYNCE-GVFS plugin.
@end table
@defopt tramp-gvfs-methods
address@hidden tramp-gvfs-methods
-This custom option is a list of external methods for address@hidden By
-default, this list includes @option{afp}, @option{dav}, @option{davs},
+This user option is a list of external methods for address@hidden By default,
+this list includes @option{afp}, @option{dav}, @option{davs},
@option{gdrive}, @option{obex}, @option{sftp} and @option{synce}.
Other methods to include are: @option{ftp} and @option{smb}.
@end defopt
@@ -1055,21 +1048,22 @@ specified otherwise.
@node Default Method
@section Selecting a default method
@cindex default method
address@hidden tramp-default-method
address@hidden tramp-default-method-alist
-Default method is for transferring files. The variable
address@hidden sets it. @value{tramp} uses this variable
-to determine the default method for tramp file names that do not have
-one specified.
address@hidden tramp-default-method
+Default method is for transferring files. The user option
address@hidden sets it. @value{tramp} uses this user
+option to determine the default method for remote file names that do
+not have one specified.
@lisp
-(setq tramp-default-method "ssh")
+(custom-set-variables '(tramp-default-method "ssh" nil (tramp)))
@end lisp
address@hidden defopt
address@hidden tramp-default-method-alist
Default methods for transferring files can be customized for specific
-user and host combinations through the alist variable
address@hidden
+user and host combinations through the user option
address@hidden
For example, the following two lines specify to use the @option{ssh}
method for all user names matching @samp{john} and the @option{rsync}
@@ -1078,22 +1072,18 @@ specifies to use the @option{su} method for the user
@samp{root} on
the host @samp{localhost}.
@lisp
address@hidden
(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"))
address@hidden group
@end lisp
address@hidden defopt
@noindent
-See the documentation for the variable
address@hidden for details.
-
address@hidden
-External methods performance faster for large files.
-
address@hidden
address@hidden methods}.
address@hidden methods}.
+External methods performance faster for large files. @pxref{Inline
+methods}. @pxref{External methods}.
Choosing the access method also depends on the security environment.
For example, @option{rsh} and @option{telnet} methods that use clear
@@ -1145,83 +1135,91 @@ improvement is not always true.
@node Default User
@section Selecting a default user
@cindex default user
address@hidden tramp-default-user
address@hidden tramp-default-user-alist
address@hidden tramp-default-user
@value{tramp} file name can omit the user name part since
@value{tramp} substitutes the currently logged-in user name. However
-this substitution can be overridden with @code{tramp-default-user}.
+this substitution can be overridden with @option{tramp-default-user}.
For example:
@lisp
-(setq tramp-default-user "root")
+(custom-set-variables'(tramp-default-user "root" nil (tramp)))
@end lisp
address@hidden defopt
-Instead of a single default user, @code{tramp-default-user-alist}
address@hidden tramp-default-user-alist
+Instead of a single default user, @option{tramp-default-user-alist}
allows multiple default user values based on access method or host
name combinations. The alist can hold multiple values. For example, to
use the @samp{john} as the default user for the domain
@samp{somewhere.else} only:
@lisp
address@hidden
(add-to-list 'tramp-default-user-alist
'("ssh" ".*\\.somewhere\\.else\\'" "john"))
address@hidden group
@end lisp
address@hidden
-See the documentation for the variable @code{tramp-default-user-alist}
-for more details.
-
A Caution: @value{tramp} will override any default user specified in
the configuration files outside Emacs, such as @file{~/.ssh/config}.
To stop @value{tramp} from applying the default value, set the
corresponding alist entry to nil:
@lisp
address@hidden
(add-to-list 'tramp-default-user-alist
'("ssh" "\\`here\\.somewhere\\.else\\'" nil))
address@hidden group
@end lisp
-The last entry in @code{tramp-default-user-alist} should be reserved
+The last entry in @option{tramp-default-user-alist} should be reserved
for catch-all or most often used login.
@lisp
address@hidden
(add-to-list 'tramp-default-user-alist
'(nil nil "jonas") t)
address@hidden group
@end lisp
address@hidden defopt
@node Default Host
@section Selecting a default host
@cindex default host
address@hidden tramp-default-host
address@hidden tramp-default-host-alist
address@hidden tramp-default-host
When host name is omitted, @value{tramp} substitutes the value from
-the @code{tramp-default-host} variable. It is initially populated
-with the local hostname where Emacs is running. Both the default user
-and default host can be overridden as follows:
+the @option{tramp-default-host} user option. It is initially
+populated with the local hostname where Emacs is running. Both the
+default user and default host can be overridden as follows:
@lisp
-(setq tramp-default-user "john"
- tramp-default-host "target")
address@hidden
+(custom-set-variables
+ '(tramp-default-user "john" nil (tramp))
+ '(tramp-default-host "target" nil (tramp)))
address@hidden group
@end lisp
With both defaults set, @address@hidden,,}} will connect
address@hidden to John's home directory on target.
address@hidden to John's home directory on @code{target}.
@strong{Note} @samp{/::} won't work, because @samp{/:} is the prefix
for quoted file names.
address@hidden
address@hidden File Names, , , emacs}.
address@hidden ifinfo
address@hidden defopt
-Instead of a single default host, @code{tramp-default-host-alist}
address@hidden tramp-default-host-alist
+Instead of a single default host, @option{tramp-default-host-alist}
allows multiple default host values based on access method or user
name combinations. The alist can hold multiple values. While
address@hidden is sufficient in most cases, some methods,
address@hidden is sufficient in most cases, some methods,
like @option{adb}, require defaults overwritten.
-
address@hidden
-See the documentation for the variable @code{tramp-default-host-alist}
-for more details.
address@hidden defopt
@node Multi-hops
@@ -1237,10 +1235,9 @@ hop kind, where the start and end points of the
connection did not
have intermediate check points.
@defopt tramp-default-proxies-alist
address@hidden tramp-default-proxies-alist
@option{tramp-default-proxies-alist} specifies proxy hosts to pass
-through. This variable is list of triples consisting of (@var{host}
address@hidden @var{proxy}).
+through. This user option is list of triples consisting of
address@hidden(@var{host} @var{user} @var{proxy})}.
The first match is the proxy host through which passes the file name
and the target host matching @var{user}@@@var{host}. @var{host} and
@@ -1259,10 +1256,12 @@ For example, to pass through the host
@samp{bastion.your.domain} as
user @samp{bird} to reach remote hosts outside the local domain:
@lisp
address@hidden
(add-to-list 'tramp-default-proxies-alist
'("\\." nil "@trampfn{ssh,bird@@bastion.your.domain,}"))
(add-to-list 'tramp-default-proxies-alist
'("\\.your\\.domain\\'" nil nil))
address@hidden group
@end lisp
@strong{Note}: @code{add-to-list} adds elements at the beginning of a
@@ -1273,10 +1272,12 @@ called @samp{jump.your.domain}, which is the only host
allowed to
connect to @samp{bastion.your.domain}, then:
@lisp
address@hidden
(add-to-list 'tramp-default-proxies-alist
'("\\`bastion\\.your\\.domain\\'"
"\\`bird\\'"
"@trampfn{ssh,jump.your.domain,}"))
address@hidden group
@end lisp
@var{proxy} can take patterns @code{%h} or @code{%u} for @var{host} or
@@ -1287,8 +1288,10 @@ To login as @samp{root} on remote hosts in the domain
access, then use this alist entry:
@lisp
address@hidden
(add-to-list 'tramp-default-proxies-alist
'("\\.your\\.domain\\'" "\\`root\\'" "@trampfn{ssh,%h,}"))
address@hidden group
@end lisp
Opening @address@hidden,randomhost.your.domain,}} first connects
@@ -1306,16 +1309,18 @@ local one, first connect via @command{ssh}, and then
apply
@command{sudo -u root}:
@lisp
address@hidden
(add-to-list 'tramp-default-proxies-alist
'(nil "\\`root\\'" "@trampfn{ssh,%h,}"))
(add-to-list 'tramp-default-proxies-alist
'((regexp-quote (system-name)) nil nil))
address@hidden group
@end lisp
The above configuration allows @value{tramp} connection as @samp{root}
to remote Ubuntu hosts.
address@hidden is also used for passing through
address@hidden is also used for passing through
firewalls or proxy servers.
For example, the local host @samp{proxy.your.domain} on port 3128
@@ -1329,9 +1334,11 @@ such a port, like 443 (https). See
discussion of ethical issues.} Then the configuration is:
@lisp
address@hidden
(add-to-list 'tramp-default-proxies-alist
'("\\`host\\.other\\.domain\\'" nil
"@trampfn{tunnel,proxy.your.domain#3128,}"))
address@hidden group
@end lisp
Gateway methods in a multiple hop chain can be declared only as the first hop.
@@ -1342,7 +1349,6 @@ Passing through hops involves dealing with restricted
shells, such as
them for proxies only.
@defopt tramp-restricted-shell-hosts-alist
address@hidden tramp-restricted-shell-hosts-alist
An alist of regular expressions of hosts running restricted shells,
such as @command{rbash}. @value{tramp} will then use them only as
proxies.
@@ -1351,8 +1357,10 @@ To specify the bastion host from the example above as
running a
restricted shell:
@lisp
address@hidden
(add-to-list 'tramp-restricted-shell-hosts-alist
"\\`bastion\\.your\\.domain\\'")
address@hidden group
@end lisp
@end defopt
@@ -1391,10 +1399,12 @@ This function returns the list of completion functions
for @var{method}.
Example:
@example
address@hidden
(tramp-get-completion-function "rsh")
@result{} ((tramp-parse-rhosts "/etc/hosts.equiv")
(tramp-parse-rhosts "~/.rhosts"))
address@hidden group
@end example
@end defun
@@ -1404,12 +1414,14 @@ for @var{method}.
Example:
@example
address@hidden
(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"))
address@hidden group
@end example
@end defun
@@ -1431,7 +1443,7 @@ This function parses files which are syntactical
equivalent to
in such files, it can return host names only.
@item @code{tramp-parse-sconfig}
address@hidden tramp-parse-shosts
address@hidden tramp-parse-sconfig
This function returns the host nicknames defined by @code{Host} entries
in @file{~/.ssh/config} style files.
@@ -1445,7 +1457,7 @@ SSH2 parsing of directories @file{/etc/ssh2/hostkeys/*}
and
are always @code{nil}.
@item @code{tramp-parse-sknownhosts}
address@hidden tramp-parse-shostkeys
address@hidden tramp-parse-sknownhosts
Another SSH2 style parsing of directories like
@file{/etc/ssh2/knownhosts/*} and @file{~/ssh2/knownhosts/*}. This
@@ -1485,9 +1497,11 @@ taken as candidates for completion for user and host
names.
Example:
@example
address@hidden
(my-tramp-parse "~/.my-tramp-hosts")
@result{} ((nil "toto") ("daniel" "melancholia"))
address@hidden group
@end example
@end defun
@@ -1535,14 +1549,12 @@ Setting @code{auth-source-debug} to @code{t} to debug
messages.
the same user or host name independent of the access method.
@vindex password-cache-expiry
-
@code{password-cache-expiry} sets the duration (in seconds) the
passwords are remembered. Passwords are never saved permanently nor
can they extend beyond the lifetime of the current Emacs session. Set
@code{password-cache-expiry} to @code{nil} to disable expiration.
@vindex password-cache
-
Set @code{password-cache} to @code{nil} to disable password caching.
@@ -1552,17 +1564,17 @@ Set @code{password-cache} to @code{nil} to disable
password caching.
@vindex tramp-persistency-file-name
For faster initial connection times, @value{tramp} stores previous
-connection properties in a file specified by the variable
address@hidden
+connection properties in a file specified by the user option
address@hidden
-The default file name for @code{tramp-persistency-file-name} is
+The default file name for @option{tramp-persistency-file-name} is
@file{~/.emacs.d/tramp}.
@value{tramp} reads this file during Emacs startup, and writes to it
when exiting Emacs. Delete this file for @value{tramp} to recreate a
new one on next Emacs startup.
-Set @code{tramp-persistency-file-name} to @code{nil} to disable
+Set @option{tramp-persistency-file-name} to @code{nil} to disable
storing connections persistently.
To reuse connection information from the persistent list,
@@ -1589,11 +1601,12 @@ connection related information for that host and
creates a new entry.
For more precise customization, parameters specified by
@code{tramp-methods} can be overwritten manually.
-Set @code{tramp-connection-properties} to manually override
+Set @option{tramp-connection-properties} to manually override
@code{tramp-methods}. Properties in this list are in the form
address@hidden(@var{regexp} @var{property} @var{value})}. @var{regexp} matches
-remote file names. Use @code{nil} to match all. @var{property} is the
-property's name, and @var{value} is the property's value.
address@hidden(@var{regexp} @var{property} @var{value})}. @var{regexp}
+matches remote file names. Use @code{nil} to match all.
address@hidden is the property's name, and @var{value} is the
+property's value.
@var{property} is any method specific parameter contained in
@code{tramp-methods}. The parameter key in @code{tramp-methods} is a
@@ -1602,12 +1615,17 @@ string @samp{<foo>} for @var{property}. For example,
this changes the
remote shell:
@lisp
address@hidden
(add-to-list 'tramp-connection-properties
(list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}")
"remote-shell" "/bin/ksh"))
address@hidden group
+
address@hidden
(add-to-list 'tramp-connection-properties
(list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}")
"remote-shell-login" '("-")))
address@hidden group
@end lisp
The parameters @code{tramp-remote-shell} and
@@ -1615,15 +1633,17 @@ The parameters @code{tramp-remote-shell} and
values for the remote host.
@var{property} could also be any property found in
address@hidden
address@hidden
To get around how restricted shells randomly drop connections, set the
special property @samp{busybox}. For example:
@lisp
address@hidden
(add-to-list 'tramp-connection-properties
(list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}")
"busybox" t))
address@hidden group
@end lisp
@@ -1642,12 +1662,10 @@ To improve performance and accuracy of remote file
access,
@command{grep} when available.
@defopt tramp-remote-path
address@hidden tramp-remote-path
address@hidden tramp-default-remote-path
address@hidden tramp-own-remote-path
@option{tramp-remote-path} specifies which remote directory paths
@value{tramp} can search for @ref{Remote programs}.
address@hidden tramp-default-remote-path
@value{tramp} uses standard defaults, such as @file{/bin} and
@file{/usr/bin}, which are reasonable for most hosts. To accommodate
differences in hosts and paths, for example, @file{/bin:/usr/bin} on
@@ -1664,11 +1682,12 @@ shown below for @value{tramp} to use when connecting.
(add-to-list 'tramp-remote-path "/usr/local/perl/bin")
@end lisp
address@hidden tramp-own-remote-path
Another way to find the remote path is to use the path assigned to the
remote user by the remote host. @value{tramp} does not normally retain
this remote path after login. However, @code{tramp-own-remote-path}
preserves the path value, which can be used to update
address@hidden
address@hidden
@lisp
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
@@ -1712,42 +1731,47 @@ login security, especially not the exotic ones.
However, @value{tramp}
provides a few tweaks to address the most common ones.
@table @asis
address@hidden @var{tramp-shell-prompt-pattern}
address@hidden @option{tramp-shell-prompt-pattern}
@vindex tramp-shell-prompt-pattern
address@hidden is for remote login shell prompt,
address@hidden is for remote login shell prompt,
which may not be the same as the local login shell prompt,
@code{shell-prompt-pattern}. Since most hosts use identical prompts,
@value{tramp} sets a similar default value for both prompts.
address@hidden @var{tramp-password-prompt-regexp}
address@hidden @var{tramp-wrong-passwd-regexp}
address@hidden @option{tramp-password-prompt-regexp}
address@hidden @option{tramp-wrong-passwd-regexp}
@vindex tramp-password-prompt-regexp
@vindex tramp-wrong-passwd-regexp
address@hidden uses @var{tramp-password-prompt-regexp} to distinguish
-between prompts for passwords and prompts for passphrases. By default,
address@hidden handles the detection in English
-language environments. See a localization example below:
address@hidden uses @option{tramp-password-prompt-regexp} to
+distinguish between prompts for passwords and prompts for passphrases.
+By default, @option{tramp-password-prompt-regexp} handles the
+detection in English language environments. See a localization
+example below:
@lisp
-(setq
- tramp-password-prompt-regexp
- (concat
- "^.*"
- (regexp-opt
- '("passphrase" "Passphrase"
- ;; English
- "password" "Password"
- ;; Deutsch
- "passwort" "Passwort"
- ;; Français
- "mot de passe" "Mot de passe") t)
- ".*:\0? *"))
address@hidden
+(custom-set-variables
+ '(tramp-password-prompt-regexp
+ (concat
+ "^.*"
+ (regexp-opt
+ '("passphrase" "Passphrase"
+ ;; English
+ "password" "Password"
+ ;; Deutsch
+ "passwort" "Passwort"
+ ;; Français
+ "mot de passe" "Mot de passe")
+ t)
+ ".*:\0? *")
+ nil (tramp)))
address@hidden group
@end lisp
Similar localization may be necessary for handling wrong password
-prompts, for which @value{tramp} uses @var{tramp-wrong-passwd-regexp}.
+prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}.
@item @command{tset} and other questions
@cindex Unix command tset
@@ -1756,8 +1780,8 @@ prompts, for which @value{tramp} uses
@var{tramp-wrong-passwd-regexp}.
To suppress inappropriate prompts for terminal type, @value{tramp}
sets the @env{TERM} to @code{dumb} before the remote login process
-begins via the variable @code{tramp-terminal-type}. This will silence
-common @command{tset} related prompts.
+begins via the user option @option{tramp-terminal-type}. This will
+silence common @command{tset} related prompts.
@value{tramp}'s strategy for handling such prompts (commonly triggered
from login scripts on remote hosts) is to set the environment
@@ -1765,26 +1789,31 @@ variables so that no prompts interrupt the shell
initialization
process.
@vindex tramp-actions-before-shell
-
An alternative approach is to configure @value{tramp} with strings
that can identify such questions using
@code{tramp-actions-before-shell}. Example:
@lisp
address@hidden
(defconst my-tramp-prompt-regexp
(concat (regexp-opt '("Enter the birth date of your mother:") t)
"\\s-*")
"Regular expression matching my login prompt question.")
address@hidden group
address@hidden
(defun my-tramp-action (proc vec)
"Enter \"19000101\" in order to give a correct answer."
(save-window-excursion
(with-current-buffer (tramp-get-connection-buffer vec)
(tramp-message vec 6 "\n%s" (buffer-string))
(tramp-send-string vec "19000101"))))
address@hidden group
address@hidden
(add-to-list 'tramp-actions-before-shell
'(my-tramp-prompt-regexp my-tramp-action))
address@hidden group
@end lisp
@@ -1845,10 +1874,12 @@ follows:
Then re-set the prompt string in @file{~/.emacs_SHELLNAME} as follows:
@example
address@hidden
# Reset the prompt for remote Tramp shells.
if [ "address@hidden/*tramp*/address@hidden" == "tramp" ] ; then
PS1="[\u@@\h \w]$ "
fi
address@hidden group
@end example
@ifinfo
@@ -1871,9 +1902,12 @@ versions. If @command{nc} refuses the @samp{-p}
parameter, then
overwrite as follows:
@lisp
address@hidden
(add-to-list
'tramp-connection-properties
- `(,(regexp-quote "192.168.0.1") "remote-copy-args" (("-l") ("%r"))))
+ `(,(regexp-quote "192.168.0.1")
+ "remote-copy-args" (("-l") ("%r"))))
address@hidden group
@end lisp
@noindent
@@ -1900,8 +1934,10 @@ do not provide @command{/bin/sh}. @command{sh} will
then invoke
whatever shell is installed on the device with this setting:
@lisp
address@hidden
(add-to-list 'tramp-connection-properties
(list (regexp-quote "192.168.0.26") "remote-shell" "sh"))
address@hidden group
@end lisp
@noindent
@@ -1913,8 +1949,10 @@ user settings. Android devices prefer
@file{/system/xbin} path over
@file{/system/bin}. Both of these are set as follows:
@lisp
address@hidden
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
(add-to-list 'tramp-remote-path "/system/xbin")
address@hidden group
@end lisp
@noindent
@@ -1934,10 +1972,12 @@ To add a corresponding entry to the
@file{~/.ssh/config} file
(recommended), use this:
@example
address@hidden
Host android
HostName 192.168.0.26
User root
Port 2222
address@hidden group
@end example
@noindent
@@ -1945,8 +1985,10 @@ To use the host name @samp{android} instead of the IP
address shown in
the previous example, fix the connection properties as follows:
@lisp
address@hidden
(add-to-list 'tramp-connection-properties
(list (regexp-quote "android") "remote-shell" "sh"))
address@hidden group
@end lisp
@noindent
@@ -1962,7 +2004,7 @@ Open a remote connection with a more concise command
@kbd{C-x C-f
To avoid @value{tramp} from saving backup files owned by @samp{root}
to locations accessible to others, default backup settings in
address@hidden have to be altered.
address@hidden have to be altered.
Here's a scenario where files could be inadvertently exposed. Emacs
by default writes backup files to the same directory as the original
@@ -1973,15 +2015,17 @@ default by @value{tramp} when using, say, a restricted
file
of the secretfile is now owned by the user logged in from
@value{tramp} and not @samp{root}.
-When @code{backup-directory-alist} is @code{nil} (the default), such
+When @option{backup-directory-alist} is @code{nil} (the default), such
problems do not occur.
To ``turn off'' the backup feature for @value{tramp} files and stop
@value{tramp} from saving to the backup directory, use this:
@lisp
address@hidden
(add-to-list 'backup-directory-alist
(cons tramp-file-name-regexp nil))
address@hidden group
@end lisp
@noindent
@@ -1989,6 +2033,7 @@ Disabling backups can be targeted to just the @option{su}
and
@option{sudo} methods:
@lisp
address@hidden
(setq backup-enable-predicate
(lambda (name)
(and (normal-backup-enable-predicate name)
@@ -1996,14 +2041,15 @@ Disabling backups can be targeted to just the
@option{su} and
(let ((method (file-remote-p name 'method)))
(when (stringp method)
(member method '("su" "sudo"))))))))
address@hidden group
@end lisp
Another option is to create better backup file naming with user and
host names prefixed to the file name. For example, transforming
@file{/etc/secretfile} to
@file{~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile}, set the
address@hidden variable @code{tramp-backup-directory-alist} from the
-existing variable @code{backup-directory-alist}.
address@hidden user option @option{tramp-backup-directory-alist} from
+the existing user option @option{backup-directory-alist}.
Then @value{tramp} backs up to a file name that is transformed with a
prefix consisting of the DIRECTORY name. This file name prefixing
@@ -2013,9 +2059,12 @@ happens only when the DIRECTORY is an absolute local
file name.
Example:
@lisp
address@hidden
(add-to-list 'backup-directory-alist
(cons "." "~/.emacs.d/backups/"))
-(setq tramp-backup-directory-alist backup-directory-alist)
+(custom-set-variables
+ '(tramp-backup-directory-alist backup-directory-alist 6 nil (tramp)))
address@hidden group
@end lisp
@noindent
@@ -2030,17 +2079,17 @@ The backup file name of
Just as for backup files, similar issues of file naming affect
auto-saving @value{tramp} files. Auto-saved files are saved in the
-directory specified by the variable
address@hidden By default this is set to the
-local temporary directory. But in some versions of Debian GNU/Linux,
-this points to the source directory where the Emacs was compiled.
-Reset such values to a valid directory.
+directory specified by the user option
address@hidden By default this is set to
+the local temporary directory. But in some versions of Debian
+GNU/Linux, this points to the source directory where the Emacs was
+compiled. Reset such values to a valid directory.
-Set @code{auto-save-file-name-transforms} to @code{nil} to save
+Set @option{auto-save-file-name-transforms} to @code{nil} to save
auto-saved files to the same directory as the original file.
-Alternatively, set the variable @code{tramp-auto-save-directory} to
-direct all auto saves to that location.
+Alternatively, set the user option @option{tramp-auto-save-directory}
+to direct all auto saves to that location.
@node Windows setup hints
@section Issues with Cygwin ssh
@@ -2206,11 +2255,13 @@ For example, type @kbd{C-x C-f @value{prefix}t
@key{TAB}},
@value{tramp} completion choices show up as
@example
address@hidden
@c @multitable address@hidden,melancholia.danann.net,}}
address@hidden,192.168.0.1,}}
@multitable @columnfractions .5 .5
@item @address@hidden @tab tmp/
@item @address@hidden @tab
@end multitable
address@hidden group
@end example
@address@hidden@value{postfixhop}} is a possible
@@ -2225,6 +2276,7 @@ Type @kbd{e @key{TAB}} for the minibuffer completion to
shows host names @value{tramp} from @file{/etc/hosts} file, for example.
@example
address@hidden
@multitable @columnfractions .5 .5
@c @multitable address@hidden,melancholia.danann.net,}}
address@hidden,192.168.0.1,}}
@item @trampfn{telnet,127.0.0.1,} @tab @trampfn{telnet,192.168.0.1,}
@@ -2232,6 +2284,7 @@ shows host names @value{tramp} from @file{/etc/hosts}
file, for example.
@item @address@hidden@value{ipv6prefix}::address@hidden@value{postfix} @tab
@trampfn{telnet,localhost,}
@item @trampfn{telnet,melancholia.danann.net,} @tab
@trampfn{telnet,melancholia,}
@end multitable
address@hidden group
@end example
Choose a host from the above list and then continue to complete file
@@ -2257,6 +2310,7 @@ stands for the default behavior.
Example:
@example
address@hidden
@kbd{C-x C-f @trampfn{telnet,melancholia,/usr/local/bin//etc} @key{TAB}}
@print{} @trampfn{telnet,melancholia,/etc}
@@ -2265,6 +2319,7 @@ Example:
@kbd{C-x C-f @trampfn{telnet,melancholia,/usr/local/bin///etc} @key{TAB}}
@print{} /etc
address@hidden group
@end example
During file name completion, remote directory contents are re-read
@@ -2274,10 +2329,10 @@ the file system by applications outside Emacs
(@pxref{Connection
caching}).
@defopt tramp-completion-reread-directory-timeout
address@hidden tramp-completion-reread-directory-timeout
The timeout is number of seconds since last remote command for
-rereading remote directory contents. 0 re-reads immediately during
-file name completion, @code{nil} uses cached directory contents.
+rereading remote directory contents. A value of 0 re-reads
+immediately during file name completion, @code{nil} uses cached
+directory contents.
@end defopt
@@ -2287,7 +2342,7 @@ file name completion, @code{nil} uses cached directory
contents.
@cindex proxy hosts, ad-hoc
@value{tramp} file name syntax can accommodate ad hoc specification of
-multiple proxies without using @code{tramp-default-proxies-alist}
+multiple proxies without using @option{tramp-default-proxies-alist}
configuration setup(@pxref{Multi-hops}).
Each proxy is specified using the same syntax as the remote host
@@ -2304,19 +2359,18 @@ proxy @samp{bird@@bastion} to a remote file on
@samp{you@@remotehost}:
Proxies can take patterns @code{%h} or @code{%u}.
@value{tramp} adds the ad-hoc definitions on the fly to
address@hidden and is available for re-use during
-that Emacs session. Subsequent @value{tramp} connections to the same
-remote host can then use the shortcut form:
address@hidden and is available for re-use
+during that Emacs session. Subsequent @value{tramp} connections to
+the same remote host can then use the shortcut form:
@address@hidden,you@@remotehost,/path}}.
@defopt tramp-save-ad-hoc-proxies
address@hidden tramp-save-ad-hoc-proxies
For ad-hoc definitions to be saved automatically in
@option{tramp-default-proxies-alist} for future Emacs sessions, set
address@hidden
address@hidden to address@hidden
@lisp
-(setq tramp-save-ad-hoc-proxies t)
+(custom-set-variables '(tramp-save-ad-hoc-proxies t nil (tramp)))
@end lisp
@end defopt
@@ -2338,9 +2392,11 @@ and does not support the pty association as specified in
host when the variable @code{default-directory} is remote:
@lisp
address@hidden
(let ((default-directory "/ssh:remote.host:"))
(start-file-process "grep" (get-buffer-create "*grep*")
"/bin/sh" "-c" "grep -e tramp *"))
address@hidden group
@end lisp
Remote processes do not apply to GVFS (see @ref{GVFS based methods})
@@ -2356,16 +2412,18 @@ like @code{compile} and @code{grep}) and @file{gud.el}
(@code{gdb} or
For @value{tramp} to find the command on the remote, it must be
accessible through the default search path as setup by @value{tramp}
upon first connection. Alternatively, use an absolute path or extend
address@hidden (see @ref{Remote programs}):
address@hidden (see @ref{Remote programs}):
@lisp
address@hidden
(add-to-list 'tramp-remote-path "~/bin")
(add-to-list 'tramp-remote-path "/appli/pub/bin")
address@hidden group
@end lisp
-Customize @code{tramp-remote-process-environment} to suit the remote
-program's environment for the remote host.
address@hidden is a list of strings
+Customize user option @option{tramp-remote-process-environment} to
+suit the remote program's environment for the remote host.
address@hidden is a list of strings
structured similar to @code{process-environment}, where each element
is a string of the form @samp{ENVVARNAME=VALUE}.
@@ -2381,17 +2439,19 @@ Use @code{add-to-list} to add entries:
@end lisp
Modifying or deleting already existing values in the
address@hidden list may not be feasible on
address@hidden list may not be feasible on
restricted remote hosts. For example, some system administrators
disallow changing @env{HISTORY} environment variable. To accommodate
such restrictions when using @value{tramp}, fix the
address@hidden by the following code in the
address@hidden by the following code in the
local @file{.emacs} file:
@lisp
address@hidden
(let ((process-environment tramp-remote-process-environment))
(setenv "HISTORY" nil)
(setq tramp-remote-process-environment process-environment))
address@hidden group
@end lisp
Setting the @env{ENV} environment variable instructs some shells to
@@ -2399,9 +2459,11 @@ read an initialization file. Per default, @value{tramp}
has disabled
this. You could overwrite this behaviour by evaluating
@lisp
address@hidden
(let ((process-environment tramp-remote-process-environment))
(setenv "ENV" "$HOME/.profile")
(setq tramp-remote-process-environment process-environment))
address@hidden group
@end lisp
@value{tramp} does not use the defaults specified in
@@ -2411,8 +2473,10 @@ this. You could overwrite this behaviour by evaluating
them as follows:
@lisp
address@hidden
(let ((process-environment (cons "HGPLAIN=1" process-environment)))
(process-file @dots{}))
address@hidden group
@end lisp
This works only for environment variables not already set in the
@@ -2429,8 +2493,10 @@ set the @env{DISPLAY} environment variable for the
remote host as
follows in the local @file{.emacs} file:
@lisp
address@hidden
(add-to-list 'tramp-remote-process-environment
(format "DISPLAY=%s" (getenv "DISPLAY")))
address@hidden group
@end lisp
@noindent
@@ -2467,8 +2533,10 @@ on remote hosts and displays output in buffers on the
local
host. Example:
@example
address@hidden
@kbd{C-x C-f @trampfn{sudo,,} @key{RET}}
@kbd{M-! tail -f /var/log/syslog.log & @key{RET}}
address@hidden group
@end example
@command{tail} command outputs continuously to the local buffer,
@@ -2487,6 +2555,7 @@ You must add the module @code{eshell-tramp} to
@kbd{M-x eshell} on a remote host:
@example
address@hidden
@b{~ $} cd @trampfn{sudo,,/etc} @key{RET}
@address@hidden,root@@host,/etc} $} hostname @key{RET}
host
@@ -2495,25 +2564,30 @@ uid=0(root) gid=0(root) groups=0(root)
@address@hidden,root@@host,/etc} $} find-file shadow @key{RET}
#<buffer shadow>
@address@hidden,root@@host,/etc} $}
address@hidden group
@end example
@code{eshell} in Emacs 23.2 added custom @code{su} and @code{sudo}
commands that set the default directory correctly for the
@file{*eshell*} buffer. @value{tramp} silently updates
address@hidden with an entry for this directory
address@hidden with an entry for this directory
(@pxref{Multi-hops}):
@example
address@hidden
@b{~ $} cd @trampfn{ssh,user@@remotehost,/etc} @key{RET}
@address@hidden,user@@remotehost,/etc} $} find-file shadow @key{RET}
File is not readable: @trampfn{ssh,user@@remotehost,/etc/shadow}
@address@hidden,user@@remotehost,/etc} $} sudo find-file shadow @key{RET}
#<buffer shadow>
address@hidden group
address@hidden
@address@hidden,user@@remotehost,/etc} $} su - @key{RET}
@address@hidden,root@@remotehost,/root} $} id @key{RET}
uid=0(root) gid=0(root) groups=0(root)
@address@hidden,root@@remotehost,/root} $}
address@hidden group
@end example
@@ -2531,8 +2605,10 @@ uid=0(root) gid=0(root) groups=0(root)
with a remote file name:
@example
address@hidden
@kbd{M-x gdb @key{RET}}
@b{Run gdb (like this):} gdb --annotate=3 @trampfn{ssh,host,~/myprog} @key{RET}
address@hidden group
@end example
Relative file names are based on the remote default directory. When
@@ -2540,8 +2616,10 @@ Relative file names are based on the remote default
directory. When
calls include:
@example
address@hidden
@kbd{M-x perldb @key{RET}}
@b{Run perldb (like this):} perl -d myprog.pl @key{RET}
address@hidden group
@end example
Just the local part of a remote file name, such as @kbd{perl -d
@@ -2568,16 +2646,20 @@ be set properly so @kbd{M-x shell} can open a proper
remote shell on a
Windows host. To open @command{cmd}, set it as follows:
@lisp
address@hidden
(setq explicit-shell-file-name "cmd"
explicit-cmd-args '("/q"))
address@hidden group
@end lisp
@noindent
To open @command{powershell} as a remote shell, use this:
@lisp
address@hidden
(setq explicit-shell-file-name "powershell"
explicit-powershell-args '("-file" "-"))
address@hidden group
@end lisp
@@ -2717,7 +2799,7 @@ responsiveness slows down. Some suggestions within the
scope of
Use an external method, such as @option{scp}, which are faster than
internal methods.
-Keep the file @code{tramp-persistency-file-name}, which is where
+Keep the file @option{tramp-persistency-file-name}, which is where
@value{tramp} caches remote information about hosts and files. Caching
is enabled by default. Don't disable it.
@@ -2726,16 +2808,18 @@ files are not independently updated outside
@value{tramp}'s control.
That cache cleanup will be necessary if the remote directories or
files are updated independent of @value{tramp}.
-Set @code{tramp-completion-reread-directory-timeout} to @code{nil} to
+Set @option{tramp-completion-reread-directory-timeout} to @code{nil} to
speed up completions, @ref{File name completion}.
Disable version control to avoid delays:
@lisp
address@hidden
(setq vc-ignore-dir-regexp
(format "\\(%s\\)\\|\\(%s\\)"
vc-ignore-dir-regexp
tramp-file-name-regexp))
address@hidden group
@end lisp
Disable excessive traces. Set @code{tramp-verbose} to 3 or lower,
@@ -2780,6 +2864,7 @@ When using fish shell on remote hosts, disable fancy
formatting by
adding the following to @file{~/.config/fish/config.fish}:
@example
address@hidden
function fish_prompt
if test $TERM = "dumb"
echo "\$ "
@@ -2787,6 +2872,7 @@ function fish_prompt
@dots{}
end
end
address@hidden group
@end example
When using WinSSHD on remote hosts, @value{tramp} do not recognize the
@@ -2818,11 +2904,13 @@ first saving to a temporary file.
@end ifinfo
@lisp
address@hidden
(add-hook
'find-file-hook
(lambda ()
(when (file-remote-p default-directory)
(set (make-local-variable 'file-precious-flag) t))))
address@hidden group
@end lisp
@end itemize
@@ -2836,8 +2924,10 @@ configuration for @command{ssh} can be configured to
kill such hangs
with the following command in the @file{~/.ssh/config}:
@example
address@hidden
Host *
ServerAliveInterval 5
address@hidden group
@end example
@@ -2850,26 +2940,33 @@ if a master session opened outside the Emacs session is
no longer
open. That is why @value{tramp} prompts for the password again even
if there is an @command{ssh} already open.
address@hidden tramp-ssh-controlmaster-options
Some @command{ssh} versions support a @code{ControlPersist} option,
which allows you to set the @code{ControlPath} provided the variable
@code{tramp-ssh-controlmaster-options} is customized as follows:
@lisp
address@hidden
(setq tramp-ssh-controlmaster-options
(concat
"-o ControlPath=/tmp/ssh-ControlPath-%%r@@%%h:%%p "
"-o ControlMaster=auto -o ControlPersist=yes"))
address@hidden group
@end lisp
Note how "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and
"%%p".
address@hidden tramp-use-ssh-controlmaster-options
If the @file{~/.ssh/config} is configured appropriately for the above
behavior, then any changes to @command{ssh} can be suppressed with
this @code{nil} setting:
@lisp
-(setq tramp-use-ssh-controlmaster-options nil)
address@hidden
+(custom-set-variables
+ '(tramp-use-ssh-controlmaster-options nil nil (tramp)))
address@hidden group
@end lisp
@@ -2912,23 +3009,29 @@ Make Emacs beep after reading from or writing to the
remote host with
the following code in @file{~/.emacs} file.
@lisp
address@hidden
(defadvice tramp-handle-write-region
(after tramp-write-beep-advice activate)
"Make tramp beep after writing a file."
(interactive)
(beep))
address@hidden group
address@hidden
(defadvice tramp-handle-do-copy-or-rename-file
(after tramp-copy-beep-advice activate)
"Make tramp beep after copying a file."
(interactive)
(beep))
address@hidden group
address@hidden
(defadvice tramp-handle-insert-file-contents
(after tramp-insert-beep-advice activate)
"Make tramp beep after inserting a file."
(interactive)
(beep))
address@hidden group
@end lisp
@@ -2938,8 +3041,8 @@ Host indication in the mode line?
Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager.
Enable it via @kbd{M-x load-theme @key{RET} tramp}. Further
-customization is explained in variable
address@hidden
+customization is explained in user option
address@hidden
@item
@@ -2950,11 +3053,13 @@ if the remote host cannot understand the same
@command{ls} command,
then set them with a hook as follows:
@lisp
address@hidden
(add-hook
'dired-before-readin-hook
(lambda ()
(when (file-remote-p default-directory)
(setq dired-actual-switches "-al"))))
address@hidden group
@end lisp
@@ -2967,6 +3072,7 @@ turn off saving history by putting this shell code in the
@file{.kshrc} file:
@example
address@hidden
if [ -f $HOME/.sh_history ] ; then
/bin/rm $HOME/.sh_history
fi
@@ -2976,6 +3082,7 @@ fi
if [ "address@hidden@}" != "unset" ] ; then
unset HISTSIZE
fi
address@hidden group
@end example
For @option{ssh}-based method, add the following line to your
@@ -3001,8 +3108,11 @@ You can define default methods and user names for hosts,
(@pxref{Default Method}, @pxref{Default User}):
@lisp
-(setq tramp-default-method "ssh"
- tramp-default-user "news")
address@hidden
+(custom-set-variables
+ '(tramp-default-method "ssh" nil (tramp))
+ '(tramp-default-user "news" nil (tramp)))
address@hidden group
@end lisp
The reduced typing: @kbd{C-x C-f @trampf{news.my.domain,/opt/news/etc}}.
@@ -3019,9 +3129,11 @@ Programs used for access methods already offer powerful
configurations
file @file{~/.ssh/config}:
@example
address@hidden
Host xy
HostName news.my.domain
User news
address@hidden group
@end example
The reduced typing: @kbd{C-x C-f @trampfn{ssh,xy,/opt/news/etc}}.
@@ -3052,6 +3164,7 @@ minibuffer.
Redefine another key sequence in Emacs for @kbd{C-x C-f}:
@lisp
address@hidden
(global-set-key
[(control x) (control y)]
(lambda ()
@@ -3060,6 +3173,7 @@ Redefine another key sequence in Emacs for @kbd{C-x C-f}:
(read-file-name
"Find Tramp file: "
"@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))))
address@hidden group
@end lisp
Simply typing @kbd{C-x C-y} would prepare minibuffer editing of file
@@ -3074,9 +3188,11 @@ Define own abbreviation (1):
Abbreviation list expansion can be used to reduce typing long file names:
@lisp
address@hidden
(add-to-list
'directory-abbrev-alist
'("^/xy" . "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))
address@hidden group
@end lisp
The reduced typing: @kbd{C-x C-f /xy @key{RET}}.
@@ -3092,23 +3208,31 @@ The @code{abbrev-mode} gives additional flexibility for
editing in the
minibuffer:
@lisp
address@hidden
(define-abbrev-table 'my-tramp-abbrev-table
'(("xy" "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}")))
address@hidden group
address@hidden
(add-hook
'minibuffer-setup-hook
(lambda ()
(abbrev-mode 1)
(setq local-abbrev-table my-tramp-abbrev-table)))
address@hidden group
address@hidden
(defadvice minibuffer-complete
(before my-minibuffer-complete activate)
(expand-abbrev))
address@hidden group
address@hidden
;; If you use partial-completion-mode
(defadvice PC-do-completion
(before my-PC-do-completion activate)
(expand-abbrev))
address@hidden group
@end lisp
The reduced typing: @kbd{C-x C-f xy @key{TAB}}.
@@ -3151,11 +3275,13 @@ Since @file{filecache} remembers visited places, add
the remote
directory to the cache:
@lisp
address@hidden
@c `with-eval-after-load' has been introduced with Emacs 24.4. Shall
@c be used when appropriate.
(eval-after-load "filecache"
'(file-cache-add-directory
"@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))
address@hidden group
@end lisp
Then use directory completion in the minibuffer with @kbd{C-x C-f
@@ -3172,20 +3298,24 @@ works for @value{tramp} file names.
Load @file{bbdb} in Emacs:
@lisp
address@hidden
(require 'bbdb)
(bbdb-initialize)
address@hidden group
@end lisp
Create a BBDB entry with @kbd{M-x bbdb-create-ftp-site}. Then specify
a method and user name where needed. Examples:
@example
address@hidden
@kbd{M-x bbdb-create-ftp-site @key{RET}}
@b{Ftp Site:} news.my.domain @key{RET}
@b{Ftp Directory:} /opt/news/etc/ @key{RET}
@b{Ftp Username:} address@hidden @key{RET}
@b{Company:} @key{RET}
@b{Additional Comments:} @key{RET}
address@hidden group
@end example
In BBDB buffer, access an entry by pressing the key @key{F}.
@@ -3203,8 +3333,8 @@ package, use the full ad-hoc file name including all
hops, like
@address@hidden,bird@@bastion|address@hidden,/opt/news/etc}}.
Alternatively, when saving abbreviated multi-hop file names
address@hidden@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, the custom
-option @code{tramp-save-ad-hoc-proxies} must be set address@hidden
address@hidden@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, the user
+option @option{tramp-save-ad-hoc-proxies} must be set address@hidden
value.
@@ -3219,10 +3349,12 @@ Configure Emacs Client
Then on the remote host, start the Emacs Server:
@lisp
address@hidden
(require 'server)
(setq server-host (system-name)
server-use-tcp t)
(server-start)
address@hidden group
@end lisp
If @code{(system-name)} of the remote host cannot be resolved on the
@@ -3244,8 +3376,10 @@ To make Emacs Client an editor for other programs, use a
wrapper
script @file{emacsclient.sh}:
@example
address@hidden
#!/bin/sh
emacsclient @trampfn{ssh,$(whoami)@@$(hostname --fqdn),$1}
address@hidden group
@end example
Then change the environment variable @env{EDITOR} to point to the
@@ -3271,8 +3405,7 @@ disable such features.
Disable @value{tramp} file name completion:
@lisp
-(custom-set-variables
- '(ido-enable-tramp-completion nil))
+(custom-set-variables '(ido-enable-tramp-completion nil))
@end lisp
@item
@@ -3295,7 +3428,7 @@ To keep Ange FTP as default the remote files access
package, set this
in @file{.emacs}:
@lisp
-(setq tramp-default-method "ftp")
+(custom-set-variables '(tramp-default-method "ftp" nil (tramp)))
@end lisp
@item
@@ -3303,7 +3436,7 @@ To disable both @value{tramp} (and Ange FTP), set
@code{tramp-mode} to
@code{nil} in @file{.emacs}.
@lisp
-(setq tramp-mode nil)
+(custom-set-variables '(tramp-mode nil nil (tramp)))
@end lisp
@item
@@ -3355,8 +3488,10 @@ the variable @code{non-essential} temporarily and bind
it to
address@hidden value.
@lisp
address@hidden
(let ((non-essential t))
@dots{})
address@hidden group
@end lisp
@@ -3374,8 +3509,10 @@ situations where callers to @code{process-file} know
there are no file
attribute changes. The let-bind form to accomplish this:
@lisp
address@hidden
(let (process-file-side-effects)
@dots{})
address@hidden group
@end lisp
For asynchronous processes, @value{tramp} uses a process sentinel to
@@ -3387,8 +3524,10 @@ sentinel is overwritten. The caller can still flush the
file
attributes cache in its process sentinel with this code:
@lisp
address@hidden
(unless (memq (process-status proc) '(run open))
(dired-uncache remote-directory))
address@hidden group
@end lisp
Since @value{tramp} traverses subdirectories starting with the
@@ -3440,19 +3579,23 @@ Other navigation keys are described in
both the error and the signal have to be set as follows:
@lisp
address@hidden
(setq debug-on-error t
debug-on-signal t)
address@hidden group
@end lisp
To enable stepping through @value{tramp} function call traces, they
have to be specifically enabled as shown in this code:
@lisp
address@hidden
(require 'trace)
(dolist (elt (all-completions "tramp-" obarray 'functionp))
(trace-function-background (intern elt)))
(untrace-function 'tramp-read-passwd)
(untrace-function 'tramp-gw-basic-authentication)
address@hidden group
@end lisp
The buffer @file{*trace-output*} contains the output from the function
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 07fc3e2..24b7322 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -40,7 +40,8 @@
"Name of the Android Debug Bridge program."
:group 'tramp
:version "24.4"
- :type 'string)
+ :type 'string
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-adb-connect-if-not-connected nil
@@ -48,7 +49,8 @@
It is used for TCP/IP devices."
:group 'tramp
:version "25.1"
- :type 'boolean)
+ :type 'boolean
+ :require 'tramp)
;;;###tramp-autoload
(defconst tramp-adb-method "adb"
@@ -60,7 +62,8 @@ It is used for TCP/IP devices."
"Regexp used as prompt in almquist shell."
:type 'string
:version "24.4"
- :group 'tramp)
+ :group 'tramp
+ :require 'tramp)
(defconst tramp-adb-ls-date-regexp
"[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]"
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 158cfb5..07176be 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -72,13 +72,16 @@ details see the info pages."
:version "24.4"
:type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
(choice :tag " Property" string)
- (choice :tag " Value" sexp))))
+ (choice :tag " Value" sexp)))
+ :require 'tramp)
+;;;###tramp-autoload
(defcustom tramp-persistency-file-name
(expand-file-name (locate-user-emacs-file "tramp"))
"File which keeps connection history for Tramp connections."
:group 'tramp
- :type 'file)
+ :type 'file
+ :require 'tramp)
(defvar tramp-cache-data-changed nil
"Whether persistent cache data have been changed.")
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index d12bab9..82abf54 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -123,7 +123,8 @@
(const "obex")
(const "sftp")
(const "smb")
- (const "synce"))))
+ (const "synce")))
+ :require 'tramp)
;; Add defaults for `tramp-default-user-alist' and `tramp-default-host-alist'.
;;;###tramp-autoload
@@ -141,7 +142,8 @@
"Zeroconf domain to be used for discovering services, like host names."
:group 'tramp
:version "23.2"
- :type 'string)
+ :type 'string
+ :require 'tramp)
;; Add the methods to `tramp-methods', in order to allow minibuffer
;; completion.
@@ -393,7 +395,8 @@ completion, nil means to use always cached values for
discovered
devices."
:group 'tramp
:version "23.2"
- :type '(choice (const nil) integer))
+ :type '(choice (const nil) integer)
+ :require 'tramp)
(defvar tramp-bluez-discovery nil
"Indicator for a running bluetooth device discovery.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 5cc239a..ee59529 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -46,7 +46,8 @@ When inline transfer, compress transferred data of file
whose size is this value or above (up to `tramp-copy-size-limit').
If it is nil, no compression at all will be applied."
:group 'tramp
- :type '(choice (const nil) integer))
+ :type '(choice (const nil) integer)
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-copy-size-limit 10240
@@ -54,7 +55,8 @@ If it is nil, no compression at all will be applied."
out-of-the-band copy.
If it is nil, out-of-the-band copy will be used without a check."
:group 'tramp
- :type '(choice (const nil) integer))
+ :type '(choice (const nil) integer)
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-terminal-type "dumb"
@@ -63,7 +65,8 @@ Because Tramp wants to parse the output of the remote shell,
it is easily
confused by ANSI color escape sequences and suchlike. Often, shell init
files conditionalize this setup based on the TERM environment variable."
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-histfile-override ".tramp_history"
@@ -81,7 +84,8 @@ e.g. \"$HOME/.sh_history\"."
:version "25.1"
:type '(choice (const :tag "Do not override HISTFILE" nil)
(const :tag "Unset HISTFILE" t)
- (string :tag "Redirect to a file")))
+ (string :tag "Redirect to a file"))
+ :require 'tramp)
;;;###tramp-autoload
(defconst tramp-display-escape-sequence-regexp "\e[[;0-9]+m"
@@ -115,7 +119,8 @@ detected as prompt when being sent on echoing hosts,
therefore.")
"Whether to use `tramp-ssh-controlmaster-options'."
:group 'tramp
:version "24.4"
- :type 'boolean)
+ :type 'boolean
+ :require 'tramp)
(defvar tramp-ssh-controlmaster-options nil
"Which ssh Control* arguments to use.
@@ -542,7 +547,8 @@ the list by the special value `tramp-own-remote-path'."
:type '(repeat (choice
(const :tag "Default Directories" tramp-default-remote-path)
(const :tag "Private Directories" tramp-own-remote-path)
- (string :tag "Directory"))))
+ (string :tag "Directory")))
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-remote-process-environment
@@ -561,7 +567,8 @@ Special handling is applied to the PATH environment, which
should
not be set here. Instead, it should be set via `tramp-remote-path'."
:group 'tramp
:version "25.2"
- :type '(repeat string))
+ :type '(repeat string)
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
@@ -578,7 +585,8 @@ shell from reading its init file."
;; `alist' is available. Who knows the right way to test it?
:type (if (get 'alist 'widget-type)
'(alist :key-type string :value-type string)
- '(repeat (cons string string))))
+ '(repeat (cons string string)))
+ :require 'tramp)
(defconst tramp-actions-before-shell
'((tramp-login-prompt-regexp tramp-action-login)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index bbf88fb..be7eb88 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -74,14 +74,16 @@
(defcustom tramp-smb-program "smbclient"
"Name of SMB client to run."
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-acl-program "smbcacls"
"Name of SMB acls to run."
:group 'tramp
:type 'string
- :version "24.4")
+ :version "24.4"
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-conf "/dev/null"
@@ -89,7 +91,8 @@
If it is nil, no smb.conf will be added to the `tramp-smb-program'
call, letting the SMB client use the default one."
:group 'tramp
- :type '(choice (const nil) (file :must-match t)))
+ :type '(choice (const nil) (file :must-match t))
+ :require 'tramp)
(defvar tramp-smb-version nil
"Version string of the SMB client.")
@@ -293,7 +296,8 @@ If it isn't found in the local $PATH, the absolute path of
winexe
shall be given. This is needed for remote processes."
:group 'tramp
:type 'string
- :version "24.3")
+ :version "24.3"
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command "powershell.exe"
@@ -301,7 +305,8 @@ shall be given. This is needed for remote processes."
This must be Powershell V2 compatible."
:group 'tramp
:type 'string
- :version "24.3")
+ :version "24.3"
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command-switch "-file -"
@@ -309,7 +314,8 @@ This must be Powershell V2 compatible."
This can be used to disable echo etc."
:group 'tramp
:type 'string
- :version "24.3")
+ :version "24.3"
+ :require 'tramp)
;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 429cd36..f262b73 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -76,7 +76,8 @@
"Whether Tramp is enabled.
If it is set to nil, all remote file names are used literally."
:group 'tramp
- :type 'boolean)
+ :type 'boolean
+ :require 'tramp)
(defcustom tramp-verbose 3
"Verbosity level for Tramp messages.
@@ -94,7 +95,8 @@ Any level x includes messages for all levels 1 .. x-1. The
levels are
9 test commands
10 traces (huge)."
:group 'tramp
- :type 'integer)
+ :type 'integer
+ :require 'tramp)
(defcustom tramp-backup-directory-alist nil
"Alist of filename patterns and backup directory names.
@@ -109,7 +111,8 @@ gives the same backup policy for Tramp files on their hosts
like the
policy for local files."
:group 'tramp
:type '(repeat (cons (regexp :tag "Regexp matching filename")
- (directory :tag "Backup directory name"))))
+ (directory :tag "Backup directory name")))
+ :require 'tramp)
(defcustom tramp-auto-save-directory nil
"Put auto-save files in this directory, if set.
@@ -117,7 +120,8 @@ The idea is to use a local directory so that auto-saving is
faster.
This setting has precedence over `auto-save-file-name-transforms'."
:group 'tramp
:type '(choice (const :tag "Use default" nil)
- (directory :tag "Auto save directory name")))
+ (directory :tag "Auto save directory name"))
+ :require 'tramp)
(defcustom tramp-encoding-shell
(or (tramp-compat-funcall 'w32-shell-name) "/bin/sh")
@@ -141,14 +145,16 @@ Note that this variable is not used for remote commands.
There are
mechanisms in tramp.el which automatically determine the right shell to
use for the remote host."
:group 'tramp
- :type '(file :must-match t))
+ :type '(file :must-match t)
+ :require 'tramp)
(defcustom tramp-encoding-command-switch
(if (tramp-compat-funcall 'w32-shell-dos-semantics) "/c" "-c")
"Use this switch together with `tramp-encoding-shell' for local commands.
See the variable `tramp-encoding-shell' for more information."
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
(defcustom tramp-encoding-command-interactive
(unless (tramp-compat-funcall 'w32-shell-dos-semantics) "-i")
@@ -156,7 +162,8 @@ See the variable `tramp-encoding-shell' for more
information."
See the variable `tramp-encoding-shell' for more information."
:version "24.1"
:group 'tramp
- :type '(choice (const nil) string))
+ :type '(choice (const nil) string)
+ :require 'tramp)
;;;###tramp-autoload
(defvar tramp-methods nil
@@ -300,7 +307,8 @@ useful only in combination with
`tramp-default-proxies-alist'.")
See `tramp-methods' for possibilities.
Also see `tramp-default-method-alist'."
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-default-method-alist nil
@@ -318,7 +326,8 @@ See `tramp-methods' for a list of possibilities for METHOD."
:group 'tramp
:type '(repeat (list (choice :tag "Host regexp" regexp sexp)
(choice :tag "User regexp" regexp sexp)
- (choice :tag "Method name" string (const nil)))))
+ (choice :tag "Method name" string (const nil))))
+ :require 'tramp)
(defcustom tramp-default-user nil
"Default user to use for transferring files.
@@ -327,7 +336,8 @@ It is nil by default; otherwise settings in configuration
files like
This variable is regarded as obsolete, and will be removed soon."
:group 'tramp
- :type '(choice (const nil) string))
+ :type '(choice (const nil) string)
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-default-user-alist nil
@@ -343,13 +353,15 @@ empty string for the method name."
:group 'tramp
:type '(repeat (list (choice :tag "Method regexp" regexp sexp)
(choice :tag " Host regexp" regexp sexp)
- (choice :tag " User name" string (const nil)))))
+ (choice :tag " User name" string (const nil))))
+ :require 'tramp)
(defcustom tramp-default-host (system-name)
"Default host to use for transferring files.
Useful for su and sudo methods mostly."
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
;;;###tramp-autoload
(defcustom tramp-default-host-alist nil
@@ -366,7 +378,8 @@ empty string for the method name."
:version "24.4"
:type '(repeat (list (choice :tag "Method regexp" regexp sexp)
(choice :tag " User regexp" regexp sexp)
- (choice :tag " Host name" string (const nil)))))
+ (choice :tag " Host name" string (const nil))))
+ :require 'tramp)
(defcustom tramp-default-proxies-alist nil
"Route to be followed for specific host/user pairs.
@@ -385,13 +398,15 @@ interpreted as a regular expression which always matches."
:group 'tramp
:type '(repeat (list (choice :tag "Host regexp" regexp sexp)
(choice :tag "User regexp" regexp sexp)
- (choice :tag " Proxy name" string (const nil)))))
+ (choice :tag " Proxy name" string (const nil))))
+ :require 'tramp)
(defcustom tramp-save-ad-hoc-proxies nil
"Whether to save ad-hoc proxies persistently."
:group 'tramp
:version "24.3"
- :type 'boolean)
+ :type 'boolean
+ :require 'tramp)
(defcustom tramp-restricted-shell-hosts-alist
(when (memq system-type '(windows-nt))
@@ -403,7 +418,8 @@ proxies only, see `tramp-default-proxies-alist'. If the
local
host runs a registered shell, it shall be added to this list, too."
:version "24.3"
:group 'tramp
- :type '(repeat (regexp :tag "Host regexp")))
+ :type '(repeat (regexp :tag "Host regexp"))
+ :require 'tramp)
;;;###tramp-autoload
(defconst tramp-local-host-regexp
@@ -464,14 +480,16 @@ the remote shell.")
"String used for end of line in local processes."
:version "24.1"
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
(defcustom tramp-rsh-end-of-line "\n"
"String used for end of line in rsh connections.
I don't think this ever needs to be changed, so please tell me about it
if you need to change this."
:group 'tramp
- :type 'string)
+ :type 'string
+ :require 'tramp)
(defcustom tramp-login-prompt-regexp
".*\\(user\\|login\\)\\( .*\\)?: *"
@@ -480,7 +498,8 @@ The regexp should match at end of buffer.
Sometimes the prompt is reported to look like \"login as:\"."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-shell-prompt-pattern
;; Allow a prompt to start right after a ^M since it indeed would be
@@ -502,7 +521,8 @@ which should work well in many cases.
This regexp must match both `tramp-initial-end-of-output' and
`tramp-end-of-output'."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-password-prompt-regexp
(format "^.*\\(%s\\).*:address@hidden *"
@@ -516,7 +536,8 @@ The regexp should match at end of buffer.
The `sudo' program appears to insert a `^@' character into the prompt."
:version "24.4"
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-wrong-passwd-regexp
(concat "^.*"
@@ -540,7 +561,8 @@ The `sudo' program appears to insert a `^@' character into
the prompt."
"Regexp matching a `login failed' message.
The regexp should match at end of buffer."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-yesno-prompt-regexp
(concat
@@ -551,19 +573,22 @@ The confirmation should be done with yes or no.
The regexp should match at end of buffer.
See also `tramp-yn-prompt-regexp'."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-yn-prompt-regexp
(concat
(regexp-opt '("Store key in cache? (y/n)"
- "Update cached key? (y/n, Return cancels connection)") t)
+ "Update cached key? (y/n, Return cancels connection)")
+ t)
"\\s-*")
"Regular expression matching all y/n queries which need to be confirmed.
The confirmation should be done with y or n.
The regexp should match at end of buffer.
See also `tramp-yesno-prompt-regexp'."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-terminal-prompt-regexp
(concat "\\("
@@ -575,7 +600,8 @@ See also `tramp-yesno-prompt-regexp'."
The regexp should match at end of buffer.
The answer will be provided by `tramp-action-terminal', which see."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-operation-not-permitted-regexp
(concat "\\(" "preserving times.*" "\\|" "set mode" "\\)" ":\\s-*"
@@ -584,18 +610,21 @@ The answer will be provided by `tramp-action-terminal',
which see."
Copying has been performed successfully already, so this message can
be ignored safely."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-copy-failed-regexp
(concat "\\(.+: "
(regexp-opt '("Permission denied"
"not a regular file"
"is a directory"
- "No such file or directory") t)
+ "No such file or directory")
+ t)
"\\)\\s-*")
"Regular expression matching copy problems in (s)cp operations."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defcustom tramp-process-alive-regexp
""
@@ -605,7 +634,8 @@ check regularly the status of the associated process.
The answer will be provided by `tramp-action-process-alive',
`tramp-action-out-of-band', which see."
:group 'tramp
- :type 'regexp)
+ :type 'regexp
+ :require 'tramp)
(defconst tramp-temp-name-prefix "tramp."
"Prefix to use for temporary files.
@@ -636,7 +666,8 @@ It can have the following values:
:group 'tramp
:version "24.4"
:type '(choice (const :tag "Ange-FTP" ftp)
- (const :tag "XEmacs" sep)))
+ (const :tag "XEmacs" sep))
+ :require 'tramp)
(defconst tramp-prefix-format
(cond ((equal tramp-syntax 'ftp) "/")
@@ -951,7 +982,8 @@ in the third line of the code.
Please raise a bug report via \"M-x tramp-bug\" if your system needs
this variable to be set as well."
:group 'tramp
- :type '(choice (const nil) integer))
+ :type '(choice (const nil) integer)
+ :require 'tramp)
;; Logging in to a remote host normally requires obtaining a pty. But
;; Emacs on MacOS X has process-connection-type set to nil by default,
@@ -962,7 +994,8 @@ this variable to be set as well."
Tramp binds `process-connection-type' to the value given here before
opening a connection to a remote host."
:group 'tramp
- :type '(choice (const nil) (const t) (const pty)))
+ :type '(choice (const nil) (const t) (const pty))
+ :require 'tramp)
(defcustom tramp-connection-timeout 60
"Defines the max time to wait for establishing a connection (in seconds).
@@ -971,7 +1004,8 @@ This can be overwritten for different connection types in
`tramp-methods'.
The timeout does not include the time reading a password."
:group 'tramp
:version "24.4"
- :type 'integer)
+ :type 'integer
+ :require 'tramp)
(defcustom tramp-connection-min-time-diff 5
"Defines seconds between two consecutive connection attempts.
@@ -985,7 +1019,8 @@ in a short time frame. In those cases it is recommended to
let-bind this variable."
:group 'tramp
:version "24.4"
- :type '(choice (const nil) integer))
+ :type '(choice (const nil) integer)
+ :require 'tramp)
(defcustom tramp-completion-reread-directory-timeout 10
"Defines seconds since last remote command before rereading a directory.
@@ -997,7 +1032,8 @@ have been gone since last remote command execution. A
value of t
would require an immediate reread during filename completion, nil
means to use always cached values for the directory contents."
:group 'tramp
- :type '(choice (const nil) (const t) integer))
+ :type '(choice (const nil) (const t) integer)
+ :require 'tramp)
;;; Internal Variables:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 59720dc: Improve handling of defcustoms in tramp,
Michael Albinus <=