diff options
| author | Michael Albinus | 2018-05-29 12:45:47 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-05-29 12:45:47 +0200 |
| commit | e5b98e02731556f891003d10ab6fc76e6b1c3dcb (patch) | |
| tree | 2ccfe2aaf31563e7d85ccef9804fdf3db9e216c7 | |
| parent | b3207538c61c0e5d370df36a35e47c951214055c (diff) | |
| parent | 13963a3a5c83aff1eacee933361e3ac0f21828cd (diff) | |
| download | emacs-e5b98e02731556f891003d10ab6fc76e6b1c3dcb.tar.gz emacs-e5b98e02731556f891003d10ab6fc76e6b1c3dcb.zip | |
Merge from origin/emacs-26
13963a3a5c * doc/misc/tramp.texi (All): Use @code instead of @option ...
6e5f19ada4 Fix Bug#31605
| -rw-r--r-- | doc/misc/tramp.texi | 180 |
1 files changed, 121 insertions, 59 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5dd1a2ca4ee..c34341b9ac9 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -682,7 +682,7 @@ remote host, and then tries that program for encoding and decoding. | |||
| 682 | @vindex tramp-inline-compress-start-size | 682 | @vindex tramp-inline-compress-start-size |
| 683 | To increase transfer speeds for large text files, use compression | 683 | To increase transfer speeds for large text files, use compression |
| 684 | before encoding. The user option | 684 | before encoding. The user option |
| 685 | @option{tramp-inline-compress-start-size} specifies the file size for | 685 | @code{tramp-inline-compress-start-size} specifies the file size for |
| 686 | such optimization. | 686 | such optimization. |
| 687 | 687 | ||
| 688 | @table @asis | 688 | @table @asis |
| @@ -1023,17 +1023,18 @@ can. | |||
| 1023 | @cindex android (with @option{adb} method) | 1023 | @cindex android (with @option{adb} method) |
| 1024 | 1024 | ||
| 1025 | @vindex tramp-adb-program | 1025 | @vindex tramp-adb-program |
| 1026 | @vindex PATH@r{, environment variable} | ||
| 1026 | This method uses Android Debug Bridge program for accessing Android | 1027 | This method uses Android Debug Bridge program for accessing Android |
| 1027 | devices. The Android Debug Bridge must be installed locally for | 1028 | devices. The Android Debug Bridge must be installed locally for |
| 1028 | @value{tramp} to work. Some GNU/Linux distributions provide Android | 1029 | @value{tramp} to work. Some GNU/Linux distributions provide Android |
| 1029 | Debug Bridge as an installation package. Alternatively, the program | 1030 | Debug Bridge as an installation package. Alternatively, the program |
| 1030 | is installed as part of the Android SDK@. @value{tramp} finds the | 1031 | is installed as part of the Android SDK@. @value{tramp} finds the |
| 1031 | @command{adb} program either via the @env{PATH} environment variable | 1032 | @command{adb} program either via the @env{PATH} environment variable |
| 1032 | or the absolute path set in the user option @option{tramp-adb-program}. | 1033 | or the absolute path set in the user option @code{tramp-adb-program}. |
| 1033 | 1034 | ||
| 1034 | @vindex tramp-adb-connect-if-not-connected | 1035 | @vindex tramp-adb-connect-if-not-connected |
| 1035 | @value{tramp} connects to Android devices with @option{adb} only when | 1036 | @value{tramp} connects to Android devices with @option{adb} only when |
| 1036 | the user option @option{tramp-adb-connect-if-not-connected} is not | 1037 | the user option @code{tramp-adb-connect-if-not-connected} is not |
| 1037 | @code{nil}. Otherwise, the connection must be established outside | 1038 | @code{nil}. Otherwise, the connection must be established outside |
| 1038 | Emacs. | 1039 | Emacs. |
| 1039 | 1040 | ||
| @@ -1166,7 +1167,7 @@ pseudo method @option{-}, @ref{File name syntax}. | |||
| 1166 | 1167 | ||
| 1167 | @defopt tramp-default-method | 1168 | @defopt tramp-default-method |
| 1168 | Default method is for transferring files. The user option | 1169 | Default method is for transferring files. The user option |
| 1169 | @option{tramp-default-method} sets it. @value{tramp} uses this user | 1170 | @code{tramp-default-method} sets it. @value{tramp} uses this user |
| 1170 | option to determine the default method for remote file names that do | 1171 | option to determine the default method for remote file names that do |
| 1171 | not have one specified. | 1172 | not have one specified. |
| 1172 | 1173 | ||
| @@ -1178,7 +1179,7 @@ not have one specified. | |||
| 1178 | @defopt tramp-default-method-alist | 1179 | @defopt tramp-default-method-alist |
| 1179 | Default methods for transferring files can be customized for specific | 1180 | Default methods for transferring files can be customized for specific |
| 1180 | user and host combinations through the user option | 1181 | user and host combinations through the user option |
| 1181 | @option{tramp-default-method-alist}. | 1182 | @code{tramp-default-method-alist}. |
| 1182 | 1183 | ||
| 1183 | For example, the following two lines specify to use the @option{ssh} | 1184 | For example, the following two lines specify to use the @option{ssh} |
| 1184 | method for all user names matching @samp{john} and the @option{rsync} | 1185 | method for all user names matching @samp{john} and the @option{rsync} |
| @@ -1254,7 +1255,7 @@ improvement is not always true. | |||
| 1254 | @defopt tramp-default-user | 1255 | @defopt tramp-default-user |
| 1255 | @value{tramp} file name can omit the user name part since | 1256 | @value{tramp} file name can omit the user name part since |
| 1256 | @value{tramp} substitutes the currently logged-in user name. However | 1257 | @value{tramp} substitutes the currently logged-in user name. However |
| 1257 | this substitution can be overridden with @option{tramp-default-user}. | 1258 | this substitution can be overridden with @code{tramp-default-user}. |
| 1258 | For example: | 1259 | For example: |
| 1259 | 1260 | ||
| 1260 | @lisp | 1261 | @lisp |
| @@ -1263,7 +1264,7 @@ For example: | |||
| 1263 | @end defopt | 1264 | @end defopt |
| 1264 | 1265 | ||
| 1265 | @defopt tramp-default-user-alist | 1266 | @defopt tramp-default-user-alist |
| 1266 | Instead of a single default user, @option{tramp-default-user-alist} | 1267 | Instead of a single default user, @code{tramp-default-user-alist} |
| 1267 | allows multiple default user values based on access method or host | 1268 | allows multiple default user values based on access method or host |
| 1268 | name combinations. The alist can hold multiple values. For example, to | 1269 | name combinations. The alist can hold multiple values. For example, to |
| 1269 | use the @samp{john} as the default user for the domain | 1270 | use the @samp{john} as the default user for the domain |
| @@ -1288,7 +1289,7 @@ corresponding alist entry to nil: | |||
| 1288 | @end group | 1289 | @end group |
| 1289 | @end lisp | 1290 | @end lisp |
| 1290 | 1291 | ||
| 1291 | The last entry in @option{tramp-default-user-alist} should be reserved | 1292 | The last entry in @code{tramp-default-user-alist} should be reserved |
| 1292 | for catch-all or most often used login. | 1293 | for catch-all or most often used login. |
| 1293 | 1294 | ||
| 1294 | @lisp | 1295 | @lisp |
| @@ -1306,7 +1307,7 @@ for catch-all or most often used login. | |||
| 1306 | 1307 | ||
| 1307 | @defopt tramp-default-host | 1308 | @defopt tramp-default-host |
| 1308 | When host name is omitted, @value{tramp} substitutes the value from | 1309 | When host name is omitted, @value{tramp} substitutes the value from |
| 1309 | the @option{tramp-default-host} user option. It is initially | 1310 | the @code{tramp-default-host} user option. It is initially |
| 1310 | populated with the local host name where Emacs is running. The | 1311 | populated with the local host name where Emacs is running. The |
| 1311 | default method, default user and default host can be overridden as | 1312 | default method, default user and default host can be overridden as |
| 1312 | follows: | 1313 | follows: |
| @@ -1325,10 +1326,10 @@ to John's home directory on @code{target} via @code{ssh}. | |||
| 1325 | @end defopt | 1326 | @end defopt |
| 1326 | 1327 | ||
| 1327 | @defopt tramp-default-host-alist | 1328 | @defopt tramp-default-host-alist |
| 1328 | Instead of a single default host, @option{tramp-default-host-alist} | 1329 | Instead of a single default host, @code{tramp-default-host-alist} |
| 1329 | allows multiple default host values based on access method or user | 1330 | allows multiple default host values based on access method or user |
| 1330 | name combinations. The alist can hold multiple values. While | 1331 | name combinations. The alist can hold multiple values. While |
| 1331 | @option{tramp-default-host} is sufficient in most cases, some methods, | 1332 | @code{tramp-default-host} is sufficient in most cases, some methods, |
| 1332 | like @option{adb}, require defaults overwritten. | 1333 | like @option{adb}, require defaults overwritten. |
| 1333 | @end defopt | 1334 | @end defopt |
| 1334 | 1335 | ||
| @@ -1346,7 +1347,7 @@ hop kind, where the start and end points of the connection did not | |||
| 1346 | have intermediate check points. | 1347 | have intermediate check points. |
| 1347 | 1348 | ||
| 1348 | @defopt tramp-default-proxies-alist | 1349 | @defopt tramp-default-proxies-alist |
| 1349 | @option{tramp-default-proxies-alist} specifies proxy hosts to pass | 1350 | @code{tramp-default-proxies-alist} specifies proxy hosts to pass |
| 1350 | through. This user option is list of triples consisting of | 1351 | through. This user option is list of triples consisting of |
| 1351 | @code{(@var{host} @var{user} @var{proxy})}. | 1352 | @code{(@var{host} @var{user} @var{proxy})}. |
| 1352 | 1353 | ||
| @@ -1709,16 +1710,16 @@ Set @code{password-cache} to @code{nil} to disable password caching. | |||
| 1709 | @vindex tramp-persistency-file-name | 1710 | @vindex tramp-persistency-file-name |
| 1710 | For faster initial connection times, @value{tramp} stores previous | 1711 | For faster initial connection times, @value{tramp} stores previous |
| 1711 | connection properties in a file specified by the user option | 1712 | connection properties in a file specified by the user option |
| 1712 | @option{tramp-persistency-file-name}. | 1713 | @code{tramp-persistency-file-name}. |
| 1713 | 1714 | ||
| 1714 | The default file name for @option{tramp-persistency-file-name} is | 1715 | The default file name for @code{tramp-persistency-file-name} is |
| 1715 | @file{~/.emacs.d/tramp}. | 1716 | @file{~/.emacs.d/tramp}. |
| 1716 | 1717 | ||
| 1717 | @value{tramp} reads this file during Emacs startup, and writes to it | 1718 | @value{tramp} reads this file during Emacs startup, and writes to it |
| 1718 | when exiting Emacs. Delete this file for @value{tramp} to recreate a | 1719 | when exiting Emacs. Delete this file for @value{tramp} to recreate a |
| 1719 | new one on next Emacs startup. | 1720 | new one on next Emacs startup. |
| 1720 | 1721 | ||
| 1721 | Set @option{tramp-persistency-file-name} to @code{nil} to disable | 1722 | Set @code{tramp-persistency-file-name} to @code{nil} to disable |
| 1722 | storing connections persistently. | 1723 | storing connections persistently. |
| 1723 | 1724 | ||
| 1724 | When @value{tramp} detects a change in the operating system version in | 1725 | When @value{tramp} detects a change in the operating system version in |
| @@ -1733,7 +1734,7 @@ For more precise customization, parameters specified by | |||
| 1733 | @code{tramp-methods} can be overwritten manually. | 1734 | @code{tramp-methods} can be overwritten manually. |
| 1734 | 1735 | ||
| 1735 | @vindex tramp-connection-properties | 1736 | @vindex tramp-connection-properties |
| 1736 | Set @option{tramp-connection-properties} to manually override | 1737 | Set @code{tramp-connection-properties} to manually override |
| 1737 | @code{tramp-methods}. Properties in this list are in the form | 1738 | @code{tramp-methods}. Properties in this list are in the form |
| 1738 | @code{(@var{regexp} @var{property} @var{value})}. @var{regexp} | 1739 | @code{(@var{regexp} @var{property} @var{value})}. @var{regexp} |
| 1739 | matches remote file names. Use @code{nil} to match all. | 1740 | matches remote file names. Use @code{nil} to match all. |
| @@ -1765,7 +1766,7 @@ The parameters @code{tramp-remote-shell} and | |||
| 1765 | values for the remote host. | 1766 | values for the remote host. |
| 1766 | 1767 | ||
| 1767 | @var{property} could also be any property found in | 1768 | @var{property} could also be any property found in |
| 1768 | @option{tramp-persistency-file-name}. | 1769 | @code{tramp-persistency-file-name}. |
| 1769 | 1770 | ||
| 1770 | To get around how restricted shells randomly drop connections, set the | 1771 | To get around how restricted shells randomly drop connections, set the |
| 1771 | special property @samp{busybox}. For example: | 1772 | special property @samp{busybox}. For example: |
| @@ -1794,7 +1795,7 @@ To improve performance and accuracy of remote file access, | |||
| 1794 | @command{grep} when available. | 1795 | @command{grep} when available. |
| 1795 | 1796 | ||
| 1796 | @defopt tramp-remote-path | 1797 | @defopt tramp-remote-path |
| 1797 | @option{tramp-remote-path} specifies which remote directory paths | 1798 | @code{tramp-remote-path} specifies which remote directory paths |
| 1798 | @value{tramp} can search for @ref{Remote programs}. | 1799 | @value{tramp} can search for @ref{Remote programs}. |
| 1799 | 1800 | ||
| 1800 | @vindex tramp-default-remote-path | 1801 | @vindex tramp-default-remote-path |
| @@ -1819,7 +1820,7 @@ Another way to find the remote path is to use the path assigned to the | |||
| 1819 | remote user by the remote host. @value{tramp} does not normally retain | 1820 | remote user by the remote host. @value{tramp} does not normally retain |
| 1820 | this remote path after login. However, @code{tramp-own-remote-path} | 1821 | this remote path after login. However, @code{tramp-own-remote-path} |
| 1821 | preserves the path value, which can be used to update | 1822 | preserves the path value, which can be used to update |
| 1822 | @option{tramp-remote-path}. | 1823 | @code{tramp-remote-path}. |
| 1823 | 1824 | ||
| 1824 | @lisp | 1825 | @lisp |
| 1825 | (add-to-list 'tramp-remote-path 'tramp-own-remote-path) | 1826 | (add-to-list 'tramp-remote-path 'tramp-own-remote-path) |
| @@ -1863,22 +1864,22 @@ login security, especially not the exotic ones. However, @value{tramp} | |||
| 1863 | provides a few tweaks to address the most common ones. | 1864 | provides a few tweaks to address the most common ones. |
| 1864 | 1865 | ||
| 1865 | @table @asis | 1866 | @table @asis |
| 1866 | @item @option{tramp-shell-prompt-pattern} | 1867 | @item @code{tramp-shell-prompt-pattern} |
| 1867 | @vindex tramp-shell-prompt-pattern | 1868 | @vindex tramp-shell-prompt-pattern |
| 1868 | 1869 | ||
| 1869 | @option{tramp-shell-prompt-pattern} is for remote login shell prompt, | 1870 | @code{tramp-shell-prompt-pattern} is for remote login shell prompt, |
| 1870 | which may not be the same as the local login shell prompt, | 1871 | which may not be the same as the local login shell prompt, |
| 1871 | @code{shell-prompt-pattern}. Since most hosts use identical prompts, | 1872 | @code{shell-prompt-pattern}. Since most hosts use identical prompts, |
| 1872 | @value{tramp} sets a similar default value for both prompts. | 1873 | @value{tramp} sets a similar default value for both prompts. |
| 1873 | 1874 | ||
| 1874 | @item @option{tramp-password-prompt-regexp} | 1875 | @item @code{tramp-password-prompt-regexp} |
| 1875 | @item @option{tramp-wrong-passwd-regexp} | 1876 | @item @code{tramp-wrong-passwd-regexp} |
| 1876 | @vindex tramp-password-prompt-regexp | 1877 | @vindex tramp-password-prompt-regexp |
| 1877 | @vindex tramp-wrong-passwd-regexp | 1878 | @vindex tramp-wrong-passwd-regexp |
| 1878 | 1879 | ||
| 1879 | @value{tramp} uses @option{tramp-password-prompt-regexp} to | 1880 | @value{tramp} uses @code{tramp-password-prompt-regexp} to |
| 1880 | distinguish between prompts for passwords and prompts for passphrases. | 1881 | distinguish between prompts for passwords and prompts for passphrases. |
| 1881 | By default, @option{tramp-password-prompt-regexp} handles the | 1882 | By default, @code{tramp-password-prompt-regexp} handles the |
| 1882 | detection in English language environments. See a localization | 1883 | detection in English language environments. See a localization |
| 1883 | example below: | 1884 | example below: |
| 1884 | 1885 | ||
| @@ -1902,17 +1903,66 @@ example below: | |||
| 1902 | @end lisp | 1903 | @end lisp |
| 1903 | 1904 | ||
| 1904 | Similar localization may be necessary for handling wrong password | 1905 | Similar localization may be necessary for handling wrong password |
| 1905 | prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}. | 1906 | prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}. |
| 1907 | |||
| 1908 | @item @code{tramp-terminal-type} | ||
| 1909 | @vindex tramp-terminal-type | ||
| 1910 | @vindex TERM@r{, environment variable} | ||
| 1911 | |||
| 1912 | @value{tramp} uses the user option @code{tramp-terminal-type} to set | ||
| 1913 | the remote environment variable @env{TERM} for the shells it runs. | ||
| 1914 | Per default, it is @samp{"dumb"}, but this could be changed. A dumb | ||
| 1915 | terminal is best suited to run the background sessions of | ||
| 1916 | @value{tramp}. However, running interactive remote shells might | ||
| 1917 | require a different setting. This could be achieved by tweaking the | ||
| 1918 | @env{TERM} environment variable in @code{process-environment}. | ||
| 1919 | |||
| 1920 | @lisp | ||
| 1921 | @group | ||
| 1922 | (let ((process-environment | ||
| 1923 | (cons "TERM=xterm-256color" process-environment))) | ||
| 1924 | (shell)) | ||
| 1925 | @end group | ||
| 1926 | @end lisp | ||
| 1927 | |||
| 1928 | @item Determining a @value{tramp} session | ||
| 1929 | @vindex TERM@r{, environment variable} | ||
| 1930 | @vindex INSIDE_EMACS@r{, environment variable} | ||
| 1931 | |||
| 1932 | Sometimes, it is needed to identify whether a shell runs under | ||
| 1933 | @value{tramp} control. The setting of environment variable @env{TERM} | ||
| 1934 | will help: | ||
| 1935 | |||
| 1936 | @example | ||
| 1937 | @group | ||
| 1938 | if test "$TERM" = "dumb"; then | ||
| 1939 | ... | ||
| 1940 | fi | ||
| 1941 | @end group | ||
| 1942 | @end example | ||
| 1943 | |||
| 1944 | Another possibility is to check the environment variable | ||
| 1945 | @env{INSIDE_EMACS}. Like for all subprocesses of Emacs, this is set | ||
| 1946 | to the version of the parent Emacs process, @xref{Interactive Shell, , | ||
| 1947 | , emacs}. @value{tramp} adds its own package version to this string, | ||
| 1948 | which could be used for further tests in an inferior shell. The | ||
| 1949 | string of that environment variable loooks always like | ||
| 1950 | |||
| 1951 | @example | ||
| 1952 | @group | ||
| 1953 | echo $INSIDE_EMACS | ||
| 1954 | @result{} 26.2,tramp:2.3.4 | ||
| 1955 | @end group | ||
| 1956 | @end example | ||
| 1906 | 1957 | ||
| 1907 | @item @command{tset} and other questions | 1958 | @item @command{tset} and other questions |
| 1908 | @cindex unix command @command{tset} | 1959 | @cindex unix command @command{tset} |
| 1909 | @cindex @command{tset} unix command | 1960 | @cindex @command{tset} unix command |
| 1910 | 1961 | ||
| 1911 | @vindex tramp-terminal-type | ||
| 1912 | To suppress inappropriate prompts for terminal type, @value{tramp} | 1962 | To suppress inappropriate prompts for terminal type, @value{tramp} |
| 1913 | sets the @env{TERM} to @code{dumb} before the remote login process | 1963 | sets the @env{TERM} environment variable before the remote login |
| 1914 | begins via the user option @option{tramp-terminal-type}. This will | 1964 | process begins via the user option @code{tramp-terminal-type} (see |
| 1915 | silence common @command{tset} related prompts. | 1965 | above). This will silence common @command{tset} related prompts. |
| 1916 | 1966 | ||
| 1917 | @value{tramp}'s strategy for handling such prompts (commonly triggered | 1967 | @value{tramp}'s strategy for handling such prompts (commonly triggered |
| 1918 | from login scripts on remote hosts) is to set the environment | 1968 | from login scripts on remote hosts) is to set the environment |
| @@ -1985,6 +2035,9 @@ shell-specific config files. For example, bash can use | |||
| 1985 | 2035 | ||
| 1986 | @item Interactive shell prompt | 2036 | @item Interactive shell prompt |
| 1987 | 2037 | ||
| 2038 | @vindex INSIDE_EMACS@r{, environment variable} | ||
| 2039 | @vindex SHELLNAME@r{, environment variable} | ||
| 2040 | @vindex ESHELL@r{, environment variable} | ||
| 1988 | @value{tramp} redefines the remote shell prompt internally for robust | 2041 | @value{tramp} redefines the remote shell prompt internally for robust |
| 1989 | parsing. This redefinition affects the looks of a prompt in an | 2042 | parsing. This redefinition affects the looks of a prompt in an |
| 1990 | interactive remote shell through commands, such as @kbd{M-x shell | 2043 | interactive remote shell through commands, such as @kbd{M-x shell |
| @@ -2142,7 +2195,7 @@ Open a remote connection with a more concise command @kbd{C-x C-f | |||
| 2142 | @vindex backup-directory-alist | 2195 | @vindex backup-directory-alist |
| 2143 | To avoid @value{tramp} from saving backup files owned by @samp{root} | 2196 | To avoid @value{tramp} from saving backup files owned by @samp{root} |
| 2144 | to locations accessible to others, default backup settings in | 2197 | to locations accessible to others, default backup settings in |
| 2145 | @option{backup-directory-alist} have to be altered. | 2198 | @code{backup-directory-alist} have to be altered. |
| 2146 | 2199 | ||
| 2147 | Here's a scenario where files could be inadvertently exposed. Emacs | 2200 | Here's a scenario where files could be inadvertently exposed. Emacs |
| 2148 | by default writes backup files to the same directory as the original | 2201 | by default writes backup files to the same directory as the original |
| @@ -2153,7 +2206,7 @@ default by @value{tramp} when using, say, a restricted file | |||
| 2153 | of the secretfile is now owned by the user logged in from | 2206 | of the secretfile is now owned by the user logged in from |
| 2154 | @value{tramp} and not @samp{root}. | 2207 | @value{tramp} and not @samp{root}. |
| 2155 | 2208 | ||
| 2156 | When @option{backup-directory-alist} is @code{nil} (the default), such | 2209 | When @code{backup-directory-alist} is @code{nil} (the default), such |
| 2157 | problems do not occur. | 2210 | problems do not occur. |
| 2158 | 2211 | ||
| 2159 | To ``turn off'' the backup feature for @value{tramp} files and stop | 2212 | To ``turn off'' the backup feature for @value{tramp} files and stop |
| @@ -2187,8 +2240,8 @@ Another option is to create better backup file naming with user and | |||
| 2187 | host names prefixed to the file name. For example, transforming | 2240 | host names prefixed to the file name. For example, transforming |
| 2188 | @file{/etc/secretfile} to | 2241 | @file{/etc/secretfile} to |
| 2189 | @file{~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile}, set the | 2242 | @file{~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile}, set the |
| 2190 | @value{tramp} user option @option{tramp-backup-directory-alist} from | 2243 | @value{tramp} user option @code{tramp-backup-directory-alist} from |
| 2191 | the existing user option @option{backup-directory-alist}. | 2244 | the existing user option @code{backup-directory-alist}. |
| 2192 | 2245 | ||
| 2193 | Then @value{tramp} backs up to a file name that is transformed with a | 2246 | Then @value{tramp} backs up to a file name that is transformed with a |
| 2194 | prefix consisting of the DIRECTORY name. This file name prefixing | 2247 | prefix consisting of the DIRECTORY name. This file name prefixing |
| @@ -2220,16 +2273,16 @@ The backup file name of | |||
| 2220 | Just as for backup files, similar issues of file naming affect | 2273 | Just as for backup files, similar issues of file naming affect |
| 2221 | auto-saving @value{tramp} files. Auto-saved files are saved in the | 2274 | auto-saving @value{tramp} files. Auto-saved files are saved in the |
| 2222 | directory specified by the user option | 2275 | directory specified by the user option |
| 2223 | @option{auto-save-file-name-transforms}. By default this is set to | 2276 | @code{auto-save-file-name-transforms}. By default this is set to |
| 2224 | the local temporary directory. But in some versions of Debian | 2277 | the local temporary directory. But in some versions of Debian |
| 2225 | GNU/Linux, this points to the source directory where the Emacs was | 2278 | GNU/Linux, this points to the source directory where the Emacs was |
| 2226 | compiled. Reset such values to a valid directory. | 2279 | compiled. Reset such values to a valid directory. |
| 2227 | 2280 | ||
| 2228 | Set @option{auto-save-file-name-transforms} to @code{nil} to save | 2281 | Set @code{auto-save-file-name-transforms} to @code{nil} to save |
| 2229 | auto-saved files to the same directory as the original file. | 2282 | auto-saved files to the same directory as the original file. |
| 2230 | 2283 | ||
| 2231 | @vindex tramp-auto-save-directory | 2284 | @vindex tramp-auto-save-directory |
| 2232 | Alternatively, set the user option @option{tramp-auto-save-directory} | 2285 | Alternatively, set the user option @code{tramp-auto-save-directory} |
| 2233 | to direct all auto saves to that location. | 2286 | to direct all auto saves to that location. |
| 2234 | 2287 | ||
| 2235 | @node Windows setup hints | 2288 | @node Windows setup hints |
| @@ -2275,6 +2328,7 @@ Windows file names to Cygwin file names. | |||
| 2275 | 2328 | ||
| 2276 | @cindex cygwin and @command{ssh-agent} | 2329 | @cindex cygwin and @command{ssh-agent} |
| 2277 | @cindex @env{SSH_AUTH_SOCK} and emacs on ms windows | 2330 | @cindex @env{SSH_AUTH_SOCK} and emacs on ms windows |
| 2331 | @vindex SSH_AUTH_SOCK@r{, environment variable} | ||
| 2278 | 2332 | ||
| 2279 | When using the @command{ssh-agent} on MS Windows for password-less | 2333 | When using the @command{ssh-agent} on MS Windows for password-less |
| 2280 | interaction, @option{ssh} methods depend on the environment variable | 2334 | interaction, @option{ssh} methods depend on the environment variable |
| @@ -2551,7 +2605,7 @@ directory contents. | |||
| 2551 | @cindex proxy hosts, ad-hoc | 2605 | @cindex proxy hosts, ad-hoc |
| 2552 | 2606 | ||
| 2553 | @value{tramp} file name syntax can accommodate ad hoc specification of | 2607 | @value{tramp} file name syntax can accommodate ad hoc specification of |
| 2554 | multiple proxies without using @option{tramp-default-proxies-alist} | 2608 | multiple proxies without using @code{tramp-default-proxies-alist} |
| 2555 | configuration setup(@pxref{Multi-hops}). | 2609 | configuration setup(@pxref{Multi-hops}). |
| 2556 | 2610 | ||
| 2557 | Each proxy is specified using the same syntax as the remote host | 2611 | Each proxy is specified using the same syntax as the remote host |
| @@ -2568,15 +2622,15 @@ proxy @samp{bird@@bastion} to a remote file on @samp{you@@remotehost}: | |||
| 2568 | Proxies can take patterns @code{%h} or @code{%u}. | 2622 | Proxies can take patterns @code{%h} or @code{%u}. |
| 2569 | 2623 | ||
| 2570 | @value{tramp} adds the ad-hoc definitions on the fly to | 2624 | @value{tramp} adds the ad-hoc definitions on the fly to |
| 2571 | @option{tramp-default-proxies-alist} and is available for re-use | 2625 | @code{tramp-default-proxies-alist} and is available for re-use |
| 2572 | during that Emacs session. Subsequent @value{tramp} connections to | 2626 | during that Emacs session. Subsequent @value{tramp} connections to |
| 2573 | the same remote host can then use the shortcut form: | 2627 | the same remote host can then use the shortcut form: |
| 2574 | @samp{@trampfn{ssh,you@@remotehost,/path}}. | 2628 | @samp{@trampfn{ssh,you@@remotehost,/path}}. |
| 2575 | 2629 | ||
| 2576 | @defopt tramp-save-ad-hoc-proxies | 2630 | @defopt tramp-save-ad-hoc-proxies |
| 2577 | For ad-hoc definitions to be saved automatically in | 2631 | For ad-hoc definitions to be saved automatically in |
| 2578 | @option{tramp-default-proxies-alist} for future Emacs sessions, set | 2632 | @code{tramp-default-proxies-alist} for future Emacs sessions, set |
| 2579 | @option{tramp-save-ad-hoc-proxies} to non-@code{nil}. | 2633 | @code{tramp-save-ad-hoc-proxies} to non-@code{nil}. |
| 2580 | 2634 | ||
| 2581 | @lisp | 2635 | @lisp |
| 2582 | (customize-set-variable 'tramp-save-ad-hoc-proxies t) | 2636 | (customize-set-variable 'tramp-save-ad-hoc-proxies t) |
| @@ -2621,7 +2675,7 @@ like @code{compile} and @code{grep}) and @file{gud.el} (@code{gdb} or | |||
| 2621 | For @value{tramp} to find the command on the remote, it must be | 2675 | For @value{tramp} to find the command on the remote, it must be |
| 2622 | accessible through the default search path as setup by @value{tramp} | 2676 | accessible through the default search path as setup by @value{tramp} |
| 2623 | upon first connection. Alternatively, use an absolute path or extend | 2677 | upon first connection. Alternatively, use an absolute path or extend |
| 2624 | @option{tramp-remote-path} (see @ref{Remote programs}): | 2678 | @code{tramp-remote-path} (see @ref{Remote programs}): |
| 2625 | 2679 | ||
| 2626 | @lisp | 2680 | @lisp |
| 2627 | @group | 2681 | @group |
| @@ -2631,9 +2685,9 @@ upon first connection. Alternatively, use an absolute path or extend | |||
| 2631 | @end lisp | 2685 | @end lisp |
| 2632 | 2686 | ||
| 2633 | @vindex tramp-remote-process-environment | 2687 | @vindex tramp-remote-process-environment |
| 2634 | Customize user option @option{tramp-remote-process-environment} to | 2688 | Customize user option @code{tramp-remote-process-environment} to |
| 2635 | suit the remote program's environment for the remote host. | 2689 | suit the remote program's environment for the remote host. |
| 2636 | @option{tramp-remote-process-environment} is a list of strings | 2690 | @code{tramp-remote-process-environment} is a list of strings |
| 2637 | structured similar to @code{process-environment}, where each element | 2691 | structured similar to @code{process-environment}, where each element |
| 2638 | is a string of the form @samp{ENVVARNAME=VALUE}. | 2692 | is a string of the form @samp{ENVVARNAME=VALUE}. |
| 2639 | 2693 | ||
| @@ -2648,12 +2702,13 @@ Use @code{add-to-list} to add entries: | |||
| 2648 | (add-to-list 'tramp-remote-process-environment "JAVA_HOME=/opt/java") | 2702 | (add-to-list 'tramp-remote-process-environment "JAVA_HOME=/opt/java") |
| 2649 | @end lisp | 2703 | @end lisp |
| 2650 | 2704 | ||
| 2705 | @vindex HISTORY@r{, environment variable} | ||
| 2651 | Modifying or deleting already existing values in the | 2706 | Modifying or deleting already existing values in the |
| 2652 | @option{tramp-remote-process-environment} list may not be feasible on | 2707 | @code{tramp-remote-process-environment} list may not be feasible on |
| 2653 | restricted remote hosts. For example, some system administrators | 2708 | restricted remote hosts. For example, some system administrators |
| 2654 | disallow changing @env{HISTORY} environment variable. To accommodate | 2709 | disallow changing @env{HISTORY} environment variable. To accommodate |
| 2655 | such restrictions when using @value{tramp}, fix the | 2710 | such restrictions when using @value{tramp}, fix the |
| 2656 | @option{tramp-remote-process-environment} by the following code in the | 2711 | @code{tramp-remote-process-environment} by the following code in the |
| 2657 | local @file{.emacs} file: | 2712 | local @file{.emacs} file: |
| 2658 | 2713 | ||
| 2659 | @lisp | 2714 | @lisp |
| @@ -2664,6 +2719,7 @@ local @file{.emacs} file: | |||
| 2664 | @end group | 2719 | @end group |
| 2665 | @end lisp | 2720 | @end lisp |
| 2666 | 2721 | ||
| 2722 | @vindex ENV@r{, environment variable} | ||
| 2667 | Setting the @env{ENV} environment variable instructs some shells to | 2723 | Setting the @env{ENV} environment variable instructs some shells to |
| 2668 | read an initialization file. Per default, @value{tramp} has disabled | 2724 | read an initialization file. Per default, @value{tramp} has disabled |
| 2669 | this. You could overwrite this behavior by evaluating | 2725 | this. You could overwrite this behavior by evaluating |
| @@ -2676,12 +2732,12 @@ this. You could overwrite this behavior by evaluating | |||
| 2676 | @end group | 2732 | @end group |
| 2677 | @end lisp | 2733 | @end lisp |
| 2678 | 2734 | ||
| 2679 | In addition to @option{tramp-remote-process-environment}, you can set | 2735 | In addition to @code{tramp-remote-process-environment}, you can set |
| 2680 | environment variables for individual remote process calls by | 2736 | environment variables for individual remote process calls by |
| 2681 | let-binding @code{process-environment}. @value{tramp} applies any | 2737 | let-binding @code{process-environment}. @value{tramp} applies any |
| 2682 | entries not present in the global default value of | 2738 | entries not present in the global default value of |
| 2683 | @code{process-environment} (overriding | 2739 | @code{process-environment} (overriding |
| 2684 | @option{tramp-remote-process-environment} settings, if they conflict). | 2740 | @code{tramp-remote-process-environment} settings, if they conflict). |
| 2685 | For example: | 2741 | For example: |
| 2686 | 2742 | ||
| 2687 | @lisp | 2743 | @lisp |
| @@ -2691,6 +2747,7 @@ For example: | |||
| 2691 | @end group | 2747 | @end group |
| 2692 | @end lisp | 2748 | @end lisp |
| 2693 | 2749 | ||
| 2750 | @vindex HGPLAIN@r{, environment variable} | ||
| 2694 | Let-binding in this way works regardless of whether the process to be | 2751 | Let-binding in this way works regardless of whether the process to be |
| 2695 | called is local or remote, since @value{tramp} would add just the | 2752 | called is local or remote, since @value{tramp} would add just the |
| 2696 | @env{HGPLAIN} setting and local processes would take whole value of | 2753 | @env{HGPLAIN} setting and local processes would take whole value of |
| @@ -2702,6 +2759,7 @@ remotely, please file a bug report. @xref{Bug Reports}. | |||
| 2702 | 2759 | ||
| 2703 | @subsection Running remote programs that create local X11 windows | 2760 | @subsection Running remote programs that create local X11 windows |
| 2704 | 2761 | ||
| 2762 | @vindex DISPLAY@r{, environment variable} | ||
| 2705 | To allow a remote program to create an X11 window on the local host, | 2763 | To allow a remote program to create an X11 window on the local host, |
| 2706 | set the @env{DISPLAY} environment variable for the remote host as | 2764 | set the @env{DISPLAY} environment variable for the remote host as |
| 2707 | follows in the local @file{.emacs} file: | 2765 | follows in the local @file{.emacs} file: |
| @@ -2729,16 +2787,16 @@ local host. | |||
| 2729 | @subsection Running @code{shell} on a remote host | 2787 | @subsection Running @code{shell} on a remote host |
| 2730 | @cindex @code{shell} | 2788 | @cindex @code{shell} |
| 2731 | 2789 | ||
| 2732 | Set @option{explicit-shell-file-name} to the appropriate shell name | 2790 | Set @code{explicit-shell-file-name} to the appropriate shell name |
| 2733 | when using @value{tramp} between two hosts with different operating | 2791 | when using @value{tramp} between two hosts with different operating |
| 2734 | systems, such as @samp{windows-nt} and @samp{gnu/linux}. This option | 2792 | systems, such as @samp{windows-nt} and @samp{gnu/linux}. This option |
| 2735 | ensures the correct name of the remote shell program. | 2793 | ensures the correct name of the remote shell program. |
| 2736 | 2794 | ||
| 2737 | When @option{explicit-shell-file-name} is equal to @code{nil}, calling | 2795 | When @code{explicit-shell-file-name} is equal to @code{nil}, calling |
| 2738 | @code{shell} interactively will prompt for a shell name. | 2796 | @code{shell} interactively will prompt for a shell name. |
| 2739 | 2797 | ||
| 2740 | Starting with Emacs 26, you could use connection-local variables for | 2798 | Starting with Emacs 26, you could use connection-local variables for |
| 2741 | setting different values of @option{explicit-shell-file-name} for | 2799 | setting different values of @code{explicit-shell-file-name} for |
| 2742 | different remote hosts. | 2800 | different remote hosts. |
| 2743 | @ifinfo | 2801 | @ifinfo |
| 2744 | @pxref{Connection Local Variables, , , elisp} | 2802 | @pxref{Connection Local Variables, , , elisp} |
| @@ -2819,7 +2877,7 @@ uid=0(root) gid=0(root) groups=0(root) | |||
| 2819 | 2877 | ||
| 2820 | @code{eshell} added custom @code{su} and @code{sudo} commands that set | 2878 | @code{eshell} added custom @code{su} and @code{sudo} commands that set |
| 2821 | the default directory correctly for the @file{*eshell*} buffer. | 2879 | the default directory correctly for the @file{*eshell*} buffer. |
| 2822 | @value{tramp} silently updates @option{tramp-default-proxies-alist} | 2880 | @value{tramp} silently updates @code{tramp-default-proxies-alist} |
| 2823 | with an entry for this directory (@pxref{Multi-hops}): | 2881 | with an entry for this directory (@pxref{Multi-hops}): |
| 2824 | 2882 | ||
| 2825 | @example | 2883 | @example |
| @@ -2902,7 +2960,7 @@ relative or absolute paths, but not remote paths. | |||
| 2902 | command. Powershell V2.0 on the remote host is required to run | 2960 | command. Powershell V2.0 on the remote host is required to run |
| 2903 | processes triggered from @value{tramp}. | 2961 | processes triggered from @value{tramp}. |
| 2904 | 2962 | ||
| 2905 | @option{explicit-shell-file-name} and @option{explicit-*-args} have to | 2963 | @code{explicit-shell-file-name} and @code{explicit-*-args} have to |
| 2906 | be set properly so @kbd{M-x shell @key{RET}} can open a proper remote | 2964 | be set properly so @kbd{M-x shell @key{RET}} can open a proper remote |
| 2907 | shell on a MS Windows host. To open @command{cmd}, set it as follows: | 2965 | shell on a MS Windows host. To open @command{cmd}, set it as follows: |
| 2908 | 2966 | ||
| @@ -3297,7 +3355,7 @@ responsiveness slows down. Some suggestions within the scope of | |||
| 3297 | Use an external method, such as @option{scp}, which are faster than | 3355 | Use an external method, such as @option{scp}, which are faster than |
| 3298 | internal methods. | 3356 | internal methods. |
| 3299 | 3357 | ||
| 3300 | Keep the file @option{tramp-persistency-file-name}, which is where | 3358 | Keep the file @code{tramp-persistency-file-name}, which is where |
| 3301 | @value{tramp} caches remote information about hosts and files. Caching | 3359 | @value{tramp} caches remote information about hosts and files. Caching |
| 3302 | is enabled by default. Don't disable it. | 3360 | is enabled by default. Don't disable it. |
| 3303 | 3361 | ||
| @@ -3307,7 +3365,7 @@ files are not independently updated outside @value{tramp}'s control. | |||
| 3307 | That cache cleanup will be necessary if the remote directories or | 3365 | That cache cleanup will be necessary if the remote directories or |
| 3308 | files are updated independent of @value{tramp}. | 3366 | files are updated independent of @value{tramp}. |
| 3309 | 3367 | ||
| 3310 | Set @option{tramp-completion-reread-directory-timeout} to @code{nil} to | 3368 | Set @code{tramp-completion-reread-directory-timeout} to @code{nil} to |
| 3311 | speed up completions, @ref{File name completion}. | 3369 | speed up completions, @ref{File name completion}. |
| 3312 | 3370 | ||
| 3313 | Disable version control to avoid delays: | 3371 | Disable version control to avoid delays: |
| @@ -3364,7 +3422,7 @@ uses left-hand side and right-hand side prompts in parallel. Add the | |||
| 3364 | following line to @file{~/.zshrc}: | 3422 | following line to @file{~/.zshrc}: |
| 3365 | 3423 | ||
| 3366 | @example | 3424 | @example |
| 3367 | [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' | 3425 | [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return |
| 3368 | @end example | 3426 | @end example |
| 3369 | 3427 | ||
| 3370 | When using fish shell on remote hosts, disable fancy formatting by | 3428 | When using fish shell on remote hosts, disable fancy formatting by |
| @@ -3572,7 +3630,7 @@ Host indication in the mode line? | |||
| 3572 | Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager. | 3630 | Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager. |
| 3573 | Enable it via @kbd{M-x load-theme @key{RET} tramp @key{RET}}. Further | 3631 | Enable it via @kbd{M-x load-theme @key{RET} tramp @key{RET}}. Further |
| 3574 | customization is explained in user option | 3632 | customization is explained in user option |
| 3575 | @option{tramp-theme-face-remapping-alist}. | 3633 | @code{tramp-theme-face-remapping-alist}. |
| 3576 | 3634 | ||
| 3577 | 3635 | ||
| 3578 | @item | 3636 | @item |
| @@ -3597,10 +3655,13 @@ then set them with a hook as follows: | |||
| 3597 | Why is @file{~/.sh_history} file on the remote host growing? | 3655 | Why is @file{~/.sh_history} file on the remote host growing? |
| 3598 | 3656 | ||
| 3599 | @vindex tramp-histfile-override | 3657 | @vindex tramp-histfile-override |
| 3658 | @vindex HISTFILE@r{, environment variable} | ||
| 3659 | @vindex HISTFILESIZE@r{, environment variable} | ||
| 3660 | @vindex HISTSIZE@r{, environment variable} | ||
| 3600 | Due to the remote shell saving tilde expansions triggered by | 3661 | Due to the remote shell saving tilde expansions triggered by |
| 3601 | @value{tramp}, the history file is probably growing rapidly. | 3662 | @value{tramp}, the history file is probably growing rapidly. |
| 3602 | @value{tramp} can suppress this behavior with the user option | 3663 | @value{tramp} can suppress this behavior with the user option |
| 3603 | @option{tramp-histfile-override}. When set to @code{t}, environment | 3664 | @code{tramp-histfile-override}. When set to @code{t}, environment |
| 3604 | variable @env{HISTFILE} is unset, and environment variables | 3665 | variable @env{HISTFILE} is unset, and environment variables |
| 3605 | @env{HISTFILESIZE} @env{HISTSIZE} are set to 0. | 3666 | @env{HISTFILESIZE} @env{HISTSIZE} are set to 0. |
| 3606 | 3667 | ||
| @@ -3896,7 +3957,7 @@ package, use the full ad-hoc file name including all hops, like | |||
| 3896 | 3957 | ||
| 3897 | Alternatively, when saving abbreviated multi-hop file names | 3958 | Alternatively, when saving abbreviated multi-hop file names |
| 3898 | @file{@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, the user | 3959 | @file{@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, the user |
| 3899 | option @option{tramp-save-ad-hoc-proxies} must be set non-@code{nil} | 3960 | option @code{tramp-save-ad-hoc-proxies} must be set non-@code{nil} |
| 3900 | value. | 3961 | value. |
| 3901 | 3962 | ||
| 3902 | 3963 | ||
| @@ -3944,6 +4005,7 @@ emacsclient @trampfn{ssh,$(whoami)@@$(hostname --fqdn),$1} | |||
| 3944 | @end group | 4005 | @end group |
| 3945 | @end example | 4006 | @end example |
| 3946 | 4007 | ||
| 4008 | @vindex EDITOR@r{, environment variable} | ||
| 3947 | Then change the environment variable @env{EDITOR} to point to the | 4009 | Then change the environment variable @env{EDITOR} to point to the |
| 3948 | wrapper script: | 4010 | wrapper script: |
| 3949 | 4011 | ||