diff options
| author | Michael Albinus | 2016-11-20 16:29:47 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-11-20 16:29:47 +0100 |
| commit | 22946702b4296c0e42e4baf6221e205b52d05cbf (patch) | |
| tree | a81e506e5176351677c8f677e32cde6236d1b070 /doc | |
| parent | 26c45889259682af0fbf05bccf7f084408860125 (diff) | |
| download | emacs-22946702b4296c0e42e4baf6221e205b52d05cbf.tar.gz emacs-22946702b4296c0e42e4baf6221e205b52d05cbf.zip | |
Add file-local-name
* doc/lispref/files.texi (Magic File Names): Add `file-local-name'.
(Unique File Names): Use it.
* etc/NEWS: Mention `file-local-name'.
* lisp/files.el (file-local-name): New defun.
(file-expand-wildcards):
* lisp/eshell/em-tramp.el (eshell/su, eshell/sudo):
* lisp/eshell/esh-ext.el (eshell-remote-command):
* lisp/eshell/esh-proc.el (eshell-gather-process-output):
* lisp/org/ob-core.el (org-babel-local-file-name):
* lisp/progmodes/gud.el (gud-common-init, gud-format-command):
* lisp/progmodes/python.el (python-shell-send-file):
* lisp/shell.el (shell):
* lisp/vc/ediff-diff.el (ediff-same-file-contents):
* lisp/vc/vc-git.el (vc-git-checkin): Use it.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/files.texi | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index e189da9fbe2..d9e366be1ba 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -2546,14 +2546,7 @@ that remote host. If such a directory does not exist, or | |||
| 2546 | @end defun | 2546 | @end defun |
| 2547 | 2547 | ||
| 2548 | In order to extract the local part of the path name from a temporary | 2548 | In order to extract the local part of the path name from a temporary |
| 2549 | file, the following code could be used: | 2549 | file, @code{file-local-name} could be used. |
| 2550 | |||
| 2551 | @example | ||
| 2552 | @group | ||
| 2553 | (let ((tmpfile (make-nearby-temp-file "foo"))) | ||
| 2554 | (or (file-remote-p tmpfile 'localname) tmpfile)) | ||
| 2555 | @end group | ||
| 2556 | @end example | ||
| 2557 | 2550 | ||
| 2558 | @node File Name Completion | 2551 | @node File Name Completion |
| 2559 | @subsection File Name Completion | 2552 | @subsection File Name Completion |
| @@ -3233,6 +3226,13 @@ non-magic directory to serve as its current directory, and this function | |||
| 3233 | is a good way to come up with one. | 3226 | is a good way to come up with one. |
| 3234 | @end defun | 3227 | @end defun |
| 3235 | 3228 | ||
| 3229 | @defun file-local-name filename | ||
| 3230 | This function returns the local part of file @var{filename}. For a | ||
| 3231 | remote @var{filename}, it returns a file name which could be used | ||
| 3232 | directly as argument of a remote process. If @var{filename} is local, | ||
| 3233 | this function returns the file name. | ||
| 3234 | @end defun | ||
| 3235 | |||
| 3236 | @defopt remote-file-name-inhibit-cache | 3236 | @defopt remote-file-name-inhibit-cache |
| 3237 | The attributes of remote files can be cached for better performance. If | 3237 | The attributes of remote files can be cached for better performance. If |
| 3238 | they are changed outside of Emacs's control, the cached values become | 3238 | they are changed outside of Emacs's control, the cached values become |