aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Großjohann2004-10-24 13:25:21 +0000
committerKai Großjohann2004-10-24 13:25:21 +0000
commitbb5d6d34377a2bcf28877ee572f44091ac0d31c5 (patch)
tree81a62b5deca1e2ae20e0f076fe8d71e47c7e608a
parent3d3b45dcf4cc3a5b4862b8be0a75d3f120d0ea12 (diff)
downloademacs-bb5d6d34377a2bcf28877ee572f44091ac0d31c5.tar.gz
emacs-bb5d6d34377a2bcf28877ee572f44091ac0d31c5.zip
(Synchronous Processes): Document process-file.
-rw-r--r--lispref/ChangeLog4
-rw-r--r--lispref/processes.texi41
2 files changed, 45 insertions, 0 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index e12fb7d3014..c9332777d69 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,7 @@
12004-10-24 Kai Grossjohann <kai.grossjohann@gmx.net>
2
3 * processes.texi (Synchronous Processes): Document process-file.
4
12004-10-22 Kenichi Handa <handa@m17n.org> 52004-10-22 Kenichi Handa <handa@m17n.org>
2 6
3 * text.texi (translate-region): Document that it accepts also a 7 * text.texi (translate-region): Document that it accepts also a
diff --git a/lispref/processes.texi b/lispref/processes.texi
index ccf8f76d87e..35041677b80 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -317,6 +317,47 @@ be found in the definition of @code{insert-directory}:
317@end smallexample 317@end smallexample
318@end defun 318@end defun
319 319
320@defun process-file program &optional infile buffer display &rest args
321This function processes files synchronously in a separate process. It
322is similar to @code{call-process} but may invoke a file handler based
323on the value of the variable @code{default-directory}. The current
324working directory of the subprocess is @code{default-directory}.
325
326The arguments are handled in almost the same way as for
327@code{call-process}, with the following differences:
328
329Some file handlers may not support all combinations and forms of the
330arguments @var{infile}, @var{buffer}, and @var{display}. For example,
331some file handlers might behave as if @var{display} was nil,
332regardless of the value actually passed. As another example, some
333file handlers might not support separating standard output and error
334output by way of the @var{buffer} argument.
335
336If a file handler is invoked, it determines the program to run based
337on the first argument @var{program}. For instance, consider that a
338handler for remote files is invoked. Then the path that is used for
339searching the program might be different than @code{exec-path}.
340
341The second argument @var{infile} may invoke a file handler. The file
342handler could be different from the handler chosen for the
343@code{process-file} function itself. (For example,
344@code{default-directory} could be on a remote host, whereas
345@var{infile} is on another remote host. Or @code{default-directory}
346could be non-special, whereas @var{infile} is on a remote host.)
347
348If @var{buffer} has the form @code{(@var{real-destination}
349@var{error-destination})}, and @var{error-destination} names a file,
350then the same remarks as for @var{infile} apply.
351
352The remaining arguments (@var{args}) will be passed to the process
353verbatim. Emacs is not involved in processing file names that are
354present in @var{args}. To avoid confusion, it may be best to avoid
355absolute file names in @var{args}, but rather to specify all file
356names as relative to @code{default-directory}. The function
357@code{file-relative-name} is useful for constructing such relative
358file names.
359@end defun
360
320@defun call-process-region start end program &optional delete destination display &rest args 361@defun call-process-region start end program &optional delete destination display &rest args
321This function sends the text from @var{start} to @var{end} as 362This function sends the text from @var{start} to @var{end} as
322standard input to a process running @var{program}. It deletes the text 363standard input to a process running @var{program}. It deletes the text