summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 0281464c61f..241f5ece3d0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3892,11 +3892,14 @@ interactively, this is t."
(shell-command command t))))
(defun process-file (program &optional infile buffer display &rest args)
- "Process files synchronously in a separate process.
+ "Process files synchronously in a separate process that runs PROGRAM.
Similar to `call-process', but may invoke a file name handler based on
`default-directory'. The current working directory of the
subprocess is `default-directory'.
+If PROGRAM is a remote file name, it should be processed
+by `file-local-name' before passing it to this function.
+
File names in INFILE and BUFFER are handled normally, but file
names in ARGS should be relative to `default-directory', as they
are passed to the process verbatim. (This is a difference to
@@ -3941,12 +3944,15 @@ Similar to `start-process', but may invoke a file name handler based on
This handler ought to run PROGRAM, perhaps on the local host,
perhaps on a remote host that corresponds to `default-directory'.
-In the latter case, the local part of `default-directory' becomes
-the working directory of the process.
+In the latter case, the local part of `default-directory', the one
+produced from it by `file-local-name', becomes the working directory
+of the process on the remote host.
PROGRAM and PROGRAM-ARGS might be file names. They are not
-objects of file name handler invocation. File name handlers might not
-support pty association, if PROGRAM is nil."
+objects of file name handler invocation, so they need to be obtained
+by calling `file-local-name', in case they are remote file names.
+
+File name handlers might not support pty association, if PROGRAM is nil."
(let ((fh (find-file-name-handler default-directory 'start-file-process)))
(if fh (apply fh 'start-file-process name buffer program program-args)
(apply 'start-process name buffer program program-args))))