aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2023-07-05 16:19:23 +0200
committerMichael Albinus2023-07-05 16:19:23 +0200
commit14e57b8f4cfbc82cbe17c7b7808d690e8975f56d (patch)
tree48f7084e23b62ed250668b63292cbd6cccdcde81
parent6c5574f9248380750cb30ea37922678c4d44a776 (diff)
downloademacs-14e57b8f4cfbc82cbe17c7b7808d690e8975f56d.tar.gz
emacs-14e57b8f4cfbc82cbe17c7b7808d690e8975f56d.zip
Adapt information about Tramp's temporary directory
* doc/misc/tramp.texi (Overview): Use scp in the example. (FUSE-based methods): Move information about mount point to node "FUSE setup". (Overview, Predefined connection information, FUSE setup) (Traces and Profiles): Refer to node "Temporary directory". (Frequently Asked Questions): Move information about temporary directory to node "Temporary directory". (Temporary directory): New node. (Top, Files directories and localnames): Add it to @menu.
-rw-r--r--doc/misc/tramp.texi93
1 files changed, 52 insertions, 41 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 4973ab2c9b1..ff2a66ae720 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -163,6 +163,7 @@ Using @value{tramp}
163 163
164How file names, directories and localnames are mangled and managed 164How file names, directories and localnames are mangled and managed
165 165
166* Temporary directory:: Where temporary files are kept.
166* Localname deconstruction:: Breaking a localname into its components. 167* Localname deconstruction:: Breaking a localname into its components.
167* External packages:: Integration with external Lisp packages. 168* External packages:: Integration with external Lisp packages.
168 169
@@ -290,11 +291,14 @@ accumulated in the buffer, then decodes that output to produce the
290file's contents. 291file's contents.
291 292
292For external transfers, @value{tramp} sends a command as follows: 293For external transfers, @value{tramp} sends a command as follows:
294
293@example 295@example
294$ rcp user@@host:/path/to/remote/file /tmp/tramp.4711 296$ scp user@@host:/path/to/remote/file <TMP>/tramp.4711
295@end example 297@end example
296@value{tramp} reads the local temporary file @file{/tmp/tramp.4711} 298
297into a buffer, and then deletes the temporary file. 299@value{tramp} reads the local temporary file @file{<TMP>/tramp.4711}
300into a buffer, and then deletes the temporary
301file.@footnote{@ref{Temporary directory}}
298 302
299@item 303@item
300Edit, modify, change the buffer contents as normal, and then save the 304Edit, modify, change the buffer contents as normal, and then save the
@@ -1398,14 +1402,6 @@ User names are part of the @command{rclone} configuration, and not
1398needed in the remote file name. If a user name is contained in the 1402needed in the remote file name. If a user name is contained in the
1399remote file name, it is ignored. 1403remote file name, it is ignored.
1400 1404
1401Internally, @value{tramp} mounts the remote system storage at location
1402@file{/tmp/tramp.rclone.storage}, with @file{storage} being the name
1403of the configured system storage.
1404
1405The mount point and optional flags to the different @option{rclone}
1406operations could be passed as connection properties, @xref{Setup of
1407rclone method}.
1408
1409Access via @option{rclone} is slow. If you have an alternative method 1405Access via @option{rclone} is slow. If you have an alternative method
1410for accessing the system storage, you should use it. 1406for accessing the system storage, you should use it.
1411@ref{GVFS-based methods} for example, methods @option{gdrive} and 1407@ref{GVFS-based methods} for example, methods @option{gdrive} and
@@ -2219,6 +2215,7 @@ to a remote home directory, like @option{adb}, @option{rclone} and
2219The temporary directory on the remote host. If not specified, the 2215The temporary directory on the remote host. If not specified, the
2220default value is @t{"/data/local/tmp"} for the @option{adb} method, 2216default value is @t{"/data/local/tmp"} for the @option{adb} method,
2221@t{"/C$/Temp"} for the @option{smb} method, and @t{"/tmp"} otherwise. 2217@t{"/C$/Temp"} for the @option{smb} method, and @t{"/tmp"} otherwise.
2218@ref{Temporary directory}.
2222 2219
2223@item @t{"direct-async-process"} 2220@item @t{"direct-async-process"}
2224 2221
@@ -2246,8 +2243,8 @@ this property has no effect.
2246 2243
2247The directory file name an @acronym{FUSE}-based file system is mounted 2244The directory file name an @acronym{FUSE}-based file system is mounted
2248on. The default value of this property is 2245on. The default value of this property is
2249@t{"/tmp/tramp.method.user@@host#port"} (not specified in 2246@t{"<TMP>/tramp.method.user@@host#port"} (not specified in
2250@code{tramp-methods}). 2247@code{tramp-methods}). @ref{Temporary directory}.
2251 2248
2252@item @t{"mount-args"}@* 2249@item @t{"mount-args"}@*
2253@t{"copyto-args"}@* 2250@t{"copyto-args"}@*
@@ -2951,10 +2948,11 @@ The fallback is to start Emacs from a shell.
2951@section @acronym{FUSE} setup hints 2948@section @acronym{FUSE} setup hints
2952 2949
2953The @acronym{FUSE} file systems are mounted by default at 2950The @acronym{FUSE} file systems are mounted by default at
2954@file{/tmp/tramp.method.user@@host#port}. The user name and port 2951@t{"<TMP>/tramp.method.user@@host#port"}.@footnote{@ref{Temporary
2955number are optional. If the file system is already mounted, it will 2952directory}} Method is either @t{"rclone"} or @t{"sshfs"}. The user
2956be used as it is. If the mount point does not exist yet, 2953name and port number are optional. If the file system is already
2957@value{tramp} creates this directory. 2954mounted, it will be used as it is. If the mount point does not exist
2955yet, @value{tramp} creates this directory.
2958 2956
2959The mount point can be overwritten by the connection property 2957The mount point can be overwritten by the connection property
2960@t{"mount-point"}, @ref{Predefined connection information}. 2958@t{"mount-point"}, @ref{Predefined connection information}.
@@ -5383,26 +5381,6 @@ be restored by moving them manually from
5383 5381
5384 5382
5385@item 5383@item
5386How to identify temporary files produced by @value{tramp}?
5387
5388@vindex tramp-temp-name-prefix
5389Temporary files are kept in your @code{temporary-file-directory}
5390directory, which is often @file{/tmp/}. By default, they have the
5391file name prefix @t{"tramp."}. If you want to change this prefix, for
5392example because you want to identify temporary files produced by
5393@code{file-local-copy} in your package, you can bind the variable
5394@code{tramp-temp-name-prefix} temporarily:
5395
5396@example
5397@group
5398(let ((tramp-temp-name-prefix "my-prefix."))
5399 (file-local-copy "@trampfn{ssh,,.emacs}"))
5400@result{} "/tmp/my-prefix.HDfgDZ"
5401@end group
5402@end example
5403
5404
5405@item
5406How to shorten long file names when typing in @value{tramp}? 5384How to shorten long file names when typing in @value{tramp}?
5407 5385
5408Adapt several of these approaches to reduce typing. If the full name 5386Adapt several of these approaches to reduce typing. If the full name
@@ -5919,11 +5897,45 @@ programs.
5919@chapter How file names, directories and localnames are mangled and managed 5897@chapter How file names, directories and localnames are mangled and managed
5920 5898
5921@menu 5899@menu
5900* Temporary directory:: Where temporary files are kept.
5922* Localname deconstruction:: Splitting a localname into its component parts. 5901* Localname deconstruction:: Splitting a localname into its component parts.
5923* External packages:: Integrating with external Lisp packages. 5902* External packages:: Integrating with external Lisp packages.
5924@end menu 5903@end menu
5925 5904
5926 5905
5906@node Temporary directory
5907@section Where temporary files are kept
5908
5909@vindex temporary-file-directory
5910Internally, @value{tramp} uses @t{"~/.cache/emacs"}
5911as local temporary directory if it exists. Otherwise, the value of
5912@code{temporary-file-directory} is used, which is often @t{"/tmp"}.
5913
5914@vindex tramp-compat-temporary-file-directory
5915@vindex <TMP>
5916This local temporary directory is kept in the constant
5917@code{tramp-compat-temporary-file-directory}. In this manual, we use
5918@t{"<TMP>"} for its value.
5919
5920The temporary directory on a remote host is @t{"/data/local/tmp"} for
5921the @option{adb} method, @t{"/C$/Temp"} for the @option{smb} method,
5922and @t{"/tmp"} otherwise. For some methods, this can be customized.
5923
5924@vindex tramp-temp-name-prefix
5925Temporary files have the file name prefix @t{"tramp."}. If you want
5926to change this prefix, for example because you want to identify
5927temporary files produced by @code{file-local-copy} in your package,
5928you can bind the variable @code{tramp-temp-name-prefix} temporarily:
5929
5930@example
5931@group
5932(let ((tramp-temp-name-prefix "my-prefix."))
5933 (file-local-copy "@trampfn{ssh,,.emacs}"))
5934@result{} "/tmp/my-prefix.HDfgDZ"
5935@end group
5936@end example
5937
5938
5927@node Localname deconstruction 5939@node Localname deconstruction
5928@section Splitting a localname into its component parts 5940@section Splitting a localname into its component parts
5929 5941
@@ -6091,10 +6103,9 @@ a file:
6091(customize-set-variable 'tramp-debug-to-file t) 6103(customize-set-variable 'tramp-debug-to-file t)
6092@end lisp 6104@end lisp
6093 6105
6094The debug buffer is written as a file in your 6106The debug buffer is written as a file in your @ref{Temporary
6095@code{temporary-file-directory}, which is usually @file{/tmp/}. Use 6107directory}. Use this option with care, because it could decrease the
6096this option with care, because it could decrease the performance of 6108performance of @value{tramp} actions.
6097@value{tramp} actions.
6098 6109
6099If @code{tramp-verbose} is greater than or equal to 11, @value{tramp} 6110If @code{tramp-verbose} is greater than or equal to 11, @value{tramp}
6100function call traces are written to the buffer @file{*trace-output*}. 6111function call traces are written to the buffer @file{*trace-output*}.