diff options
| author | Kai Großjohann | 2004-10-24 13:25:21 +0000 |
|---|---|---|
| committer | Kai Großjohann | 2004-10-24 13:25:21 +0000 |
| commit | bb5d6d34377a2bcf28877ee572f44091ac0d31c5 (patch) | |
| tree | 81a62b5deca1e2ae20e0f076fe8d71e47c7e608a | |
| parent | 3d3b45dcf4cc3a5b4862b8be0a75d3f120d0ea12 (diff) | |
| download | emacs-bb5d6d34377a2bcf28877ee572f44091ac0d31c5.tar.gz emacs-bb5d6d34377a2bcf28877ee572f44091ac0d31c5.zip | |
(Synchronous Processes): Document process-file.
| -rw-r--r-- | lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | lispref/processes.texi | 41 |
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 @@ | |||
| 1 | 2004-10-24 Kai Grossjohann <kai.grossjohann@gmx.net> | ||
| 2 | |||
| 3 | * processes.texi (Synchronous Processes): Document process-file. | ||
| 4 | |||
| 1 | 2004-10-22 Kenichi Handa <handa@m17n.org> | 5 | 2004-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 | ||
| 321 | This function processes files synchronously in a separate process. It | ||
| 322 | is similar to @code{call-process} but may invoke a file handler based | ||
| 323 | on the value of the variable @code{default-directory}. The current | ||
| 324 | working directory of the subprocess is @code{default-directory}. | ||
| 325 | |||
| 326 | The arguments are handled in almost the same way as for | ||
| 327 | @code{call-process}, with the following differences: | ||
| 328 | |||
| 329 | Some file handlers may not support all combinations and forms of the | ||
| 330 | arguments @var{infile}, @var{buffer}, and @var{display}. For example, | ||
| 331 | some file handlers might behave as if @var{display} was nil, | ||
| 332 | regardless of the value actually passed. As another example, some | ||
| 333 | file handlers might not support separating standard output and error | ||
| 334 | output by way of the @var{buffer} argument. | ||
| 335 | |||
| 336 | If a file handler is invoked, it determines the program to run based | ||
| 337 | on the first argument @var{program}. For instance, consider that a | ||
| 338 | handler for remote files is invoked. Then the path that is used for | ||
| 339 | searching the program might be different than @code{exec-path}. | ||
| 340 | |||
| 341 | The second argument @var{infile} may invoke a file handler. The file | ||
| 342 | handler 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} | ||
| 346 | could be non-special, whereas @var{infile} is on a remote host.) | ||
| 347 | |||
| 348 | If @var{buffer} has the form @code{(@var{real-destination} | ||
| 349 | @var{error-destination})}, and @var{error-destination} names a file, | ||
| 350 | then the same remarks as for @var{infile} apply. | ||
| 351 | |||
| 352 | The remaining arguments (@var{args}) will be passed to the process | ||
| 353 | verbatim. Emacs is not involved in processing file names that are | ||
| 354 | present in @var{args}. To avoid confusion, it may be best to avoid | ||
| 355 | absolute file names in @var{args}, but rather to specify all file | ||
| 356 | names as relative to @code{default-directory}. The function | ||
| 357 | @code{file-relative-name} is useful for constructing such relative | ||
| 358 | file 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 |
| 321 | This function sends the text from @var{start} to @var{end} as | 362 | This function sends the text from @var{start} to @var{end} as |
| 322 | standard input to a process running @var{program}. It deletes the text | 363 | standard input to a process running @var{program}. It deletes the text |