diff options
author | Glenn Morris <rgm@gnu.org> | 2018-12-30 17:02:40 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-12-30 17:02:40 -0800 |
commit | 433b6a74ec73608ff06106daee4f53c5175d5297 (patch) | |
tree | 1be58fb0808c683eb4b488a95555e2e24206ea61 /doc/lispref/files.texi | |
parent | f23b1db37a816ab88a5970e67d1aaeb7f68ca47c (diff) | |
parent | 82c82b1c773f441fe424b7ed1757c8eda31814c0 (diff) | |
download | emacs-433b6a74ec73608ff06106daee4f53c5175d5297.tar.gz |
Merge from origin/emacs-26
82c82b1 (origin/emacs-26) In user manual fix value of default frame h...
2e8825d Improve documentation of 'file-local-name' and related APIs
11f0635 ; Remove comment in esh-proc.el
# Conflicts:
# lisp/simple.el
Diffstat (limited to 'doc/lispref/files.texi')
-rw-r--r-- | doc/lispref/files.texi | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index d929978b6ea..21823c95694 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -2512,9 +2512,9 @@ with @samp{/:}. @defmac file-name-quote name This macro adds the quotation prefix @samp{/:} to the file @var{name}. For a local file @var{name}, it prefixes @var{name} with @samp{/:}. -If @var{name} is a remote file name, the local part of @var{name} is -quoted. If @var{name} is already a quoted file name, @var{name} is -returned unchanged. +If @var{name} is a remote file name, the local part of @var{name} +(@pxref{Magic File Names}) is quoted. If @var{name} is already a +quoted file name, @var{name} is returned unchanged. @example @group @@ -2693,8 +2693,8 @@ that remote host. If such a directory does not exist, or @code{temporary-file-directory} is returned. @end defun -In order to extract the local part of the path name from a temporary -file, @code{file-local-name} could be used. +In order to extract the local part of the file's name of a temporary +file, use @code{file-local-name} (@pxref{Magic File Names}). @node File Name Completion @subsection File Name Completion @@ -3385,11 +3385,24 @@ non-magic directory to serve as its current directory, and this function is a good way to come up with one. @end defun +@cindex local part of remote file name @defun file-local-name filename -This function returns the local part of file @var{filename}. For a -remote @var{filename}, it returns a file name which could be used -directly as argument of a remote process. If @var{filename} is local, -this function returns the file name. +This function returns the @dfn{local part} of @var{filename}. This is +the part of the file's name that identifies it on the remote host, and +is typically obtained by removing from the remote file name the parts +that specify the remote host and the method of accessing it. For +example: + +@smallexample +(file-local-name "/ssh:@var{user}@@@var{host}:/foo/bar") + @result{} "/foo/bar" +@end smallexample + +For a remote @var{filename}, this function returns a file name which +could be used directly as an argument of a remote process +(@pxref{Asynchronous Processes}, and @pxref{Synchronous Processes}), +and as the program to run on the remote host. If @var{filename} is +local, this function returns it unchanged. @end defun @defopt remote-file-name-inhibit-cache |