diff options
| author | Glenn Morris | 2012-04-14 18:58:41 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-04-14 18:58:41 -0700 |
| commit | 12acf78334a9a2ea17a083c7aac93d3e5246ace1 (patch) | |
| tree | 76af1b0c8545719741e7d267e2a8dd5e890d4bd2 | |
| parent | e153c136436ff5eb106e51284914cb580ba23774 (diff) | |
| download | emacs-12acf78334a9a2ea17a083c7aac93d3e5246ace1.tar.gz emacs-12acf78334a9a2ea17a083c7aac93d3e5246ace1.zip | |
More small edits for doc/lispref/processes.texi
* doc/lispref/processes.texi (Asynchronous Processes, Deleting Processes):
Copyedits.
(Asynchronous Processes): Update some example output.
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 54 |
2 files changed, 35 insertions, 25 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fd531721553..74c32ccb7bb 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | 2012-04-15 Glenn Morris <rgm@gnu.org> | 1 | 2012-04-15 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * processes.texi (Processes, Subprocess Creation, Shell Arguments): | 3 | * processes.texi (Processes, Subprocess Creation, Shell Arguments): |
| 4 | (Synchronous Processes): Copyedits. | 4 | (Synchronous Processes, Asynchronous Processes, Deleting Processes): |
| 5 | Copyedits. | ||
| 5 | (Subprocess Creation): Discourage modifying exec-path directly. | 6 | (Subprocess Creation): Discourage modifying exec-path directly. |
| 6 | (Synchronous Processes): Update some example output. | 7 | (Synchronous Processes, Asynchronous Processes): |
| 8 | Update some example output. | ||
| 7 | (Process Information): Fix typo. | 9 | (Process Information): Fix typo. |
| 8 | (Bindat Spec): Use Texinfo-recommended form of quote+punctuation. | 10 | (Bindat Spec): Use Texinfo-recommended form of quote+punctuation. |
| 9 | 11 | ||
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 0f1c291bdcd..509b3a1c2c6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -496,6 +496,7 @@ inputinput@point{} | |||
| 496 | "-c" command) ; @r{arguments for the shell} | 496 | "-c" command) ; @r{arguments for the shell} |
| 497 | @end group | 497 | @end group |
| 498 | @end smallexample | 498 | @end smallexample |
| 499 | @c It actually uses shell-command-switch, but no need to mention that here. | ||
| 499 | @end defun | 500 | @end defun |
| 500 | 501 | ||
| 501 | @defun call-process-shell-command command &optional infile destination display &rest args | 502 | @defun call-process-shell-command command &optional infile destination display &rest args |
| @@ -562,7 +563,8 @@ The remaining arguments, @var{args}, are strings that specify command | |||
| 562 | line arguments for the program. | 563 | line arguments for the program. |
| 563 | 564 | ||
| 564 | In the example below, the first process is started and runs (rather, | 565 | In the example below, the first process is started and runs (rather, |
| 565 | sleeps) for 100 seconds. Meanwhile, the second process is started, and | 566 | sleeps) for 100 seconds (the output buffer @samp{foo} is created |
| 567 | immediately). Meanwhile, the second process is started, and | ||
| 566 | given the name @samp{my-process<1>} for the sake of uniqueness. It | 568 | given the name @samp{my-process<1>} for the sake of uniqueness. It |
| 567 | inserts the directory listing at the end of the buffer @samp{foo}, | 569 | inserts the directory listing at the end of the buffer @samp{foo}, |
| 568 | before the first process finishes. Then it finishes, and a message to | 570 | before the first process finishes. Then it finishes, and a message to |
| @@ -576,13 +578,15 @@ finishes, and another message is inserted in the buffer for it. | |||
| 576 | @end group | 578 | @end group |
| 577 | 579 | ||
| 578 | @group | 580 | @group |
| 579 | (start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin") | 581 | (start-process "my-process" "foo" "ls" "-l" "/bin") |
| 580 | @result{} #<process my-process<1>> | 582 | @result{} #<process my-process<1>> |
| 581 | 583 | ||
| 582 | ---------- Buffer: foo ---------- | 584 | ---------- Buffer: foo ---------- |
| 583 | total 2 | 585 | total 8336 |
| 584 | lrwxrwxrwx 1 lewis 14 Jul 22 10:12 gnuemacs --> /emacs | 586 | -rwxr-xr-x 1 root root 971384 Mar 30 10:14 bash |
| 585 | -rwxrwxrwx 1 lewis 19 Jul 30 21:02 lemon | 587 | -rwxr-xr-x 1 root root 146920 Jul 5 2011 bsd-csh |
| 588 | @dots{} | ||
| 589 | -rwxr-xr-x 1 root root 696880 Feb 28 15:55 zsh4 | ||
| 586 | 590 | ||
| 587 | Process my-process<1> finished | 591 | Process my-process<1> finished |
| 588 | 592 | ||
| @@ -595,45 +599,49 @@ Process my-process finished | |||
| 595 | @defun start-file-process name buffer-or-name program &rest args | 599 | @defun start-file-process name buffer-or-name program &rest args |
| 596 | Like @code{start-process}, this function starts a new asynchronous | 600 | Like @code{start-process}, this function starts a new asynchronous |
| 597 | subprocess running @var{program} in it, and returns its process | 601 | subprocess running @var{program} in it, and returns its process |
| 598 | object---when @code{default-directory} is not a magic file name. | 602 | object. |
| 599 | 603 | ||
| 600 | If @code{default-directory} is magic, the function invokes its file | 604 | The difference from @code{start-process} is that this function may |
| 601 | handler instead. This handler ought to run @var{program}, perhaps on | 605 | invoked a file handler based on the value of @code{default-directory}. |
| 602 | the local host, perhaps on a remote host that corresponds to | 606 | This handler ought to run @var{program}, perhaps on the local host, |
| 603 | @code{default-directory}. In the latter case, the local part of | 607 | perhaps on a remote host that corresponds to @code{default-directory}. |
| 604 | @code{default-directory} becomes the working directory of the process. | 608 | In the latter case, the local part of @code{default-directory} becomes |
| 609 | the working directory of the process. | ||
| 605 | 610 | ||
| 606 | This function does not try to invoke file name handlers for | 611 | This function does not try to invoke file name handlers for |
| 607 | @var{program} or for the @var{program-args}. | 612 | @var{program} or for the @var{program-args}. |
| 608 | 613 | ||
| 609 | Depending on the implementation of the file handler, it might not be | 614 | Depending on the implementation of the file handler, it might not be |
| 610 | possible to apply @code{process-filter} or @code{process-sentinel} to | 615 | possible to apply @code{process-filter} or @code{process-sentinel} to |
| 611 | the resulting process object (@pxref{Filter Functions}, @pxref{Sentinels}). | 616 | the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}. |
| 612 | 617 | ||
| 618 | @c FIXME Can we find a better example (i.e. a more modern function | ||
| 619 | @c that is actually documented). | ||
| 613 | Some file handlers may not support @code{start-file-process} (for | 620 | Some file handlers may not support @code{start-file-process} (for |
| 614 | example @code{ange-ftp-hook-function}). In such cases, the function | 621 | example the function @code{ange-ftp-hook-function}). In such cases, |
| 615 | does nothing and returns @code{nil}. | 622 | this function does nothing and returns @code{nil}. |
| 616 | @end defun | 623 | @end defun |
| 617 | 624 | ||
| 618 | @defun start-process-shell-command name buffer-or-name command | 625 | @defun start-process-shell-command name buffer-or-name command |
| 619 | This function is like @code{start-process} except that it uses a shell | 626 | This function is like @code{start-process}, except that it uses a shell |
| 620 | to execute the specified command. The argument @var{command} is a shell | 627 | to execute the specified command. The argument @var{command} is a shell |
| 621 | command name. The variable @code{shell-file-name} specifies which shell to | 628 | command name. The variable @code{shell-file-name} specifies which shell to |
| 622 | use. | 629 | use. |
| 623 | 630 | ||
| 624 | The point of running a program through the shell, rather than directly | 631 | The point of running a program through the shell, rather than directly |
| 625 | with @code{start-process}, is so that you can employ shell features such | 632 | with @code{start-process}, is so that you can employ shell features such |
| 626 | as wildcards in the arguments. It follows that if you include an | 633 | as wildcards in the arguments. It follows that if you include any |
| 627 | arbitrary user-specified arguments in the command, you should quote it | 634 | arbitrary user-specified arguments in the command, you should quote them |
| 628 | with @code{shell-quote-argument} first, so that any special shell | 635 | with @code{shell-quote-argument} first, so that any special shell |
| 629 | characters do @emph{not} have their special shell meanings. @xref{Shell | 636 | characters do @emph{not} have their special shell meanings. @xref{Shell |
| 630 | Arguments}. | 637 | Arguments}. Of course, when executing commands based on user input |
| 638 | you should also consider the security implications. | ||
| 631 | @end defun | 639 | @end defun |
| 632 | 640 | ||
| 633 | @defun start-file-process-shell-command name buffer-or-name command | 641 | @defun start-file-process-shell-command name buffer-or-name command |
| 634 | This function is like @code{start-process-shell-command}, but uses | 642 | This function is like @code{start-process-shell-command}, but uses |
| 635 | @code{start-file-process} internally. By this, @var{command} can be | 643 | @code{start-file-process} internally. Because of this, @var{command} |
| 636 | executed also on remote hosts, depending on @code{default-directory}. | 644 | can also be executed on remote hosts, depending on @code{default-directory}. |
| 637 | @end defun | 645 | @end defun |
| 638 | 646 | ||
| 639 | @defvar process-connection-type | 647 | @defvar process-connection-type |
| @@ -658,7 +666,7 @@ with one subprocess by binding the variable around the call to | |||
| 658 | 666 | ||
| 659 | @smallexample | 667 | @smallexample |
| 660 | @group | 668 | @group |
| 661 | (let ((process-connection-type nil)) ; @r{Use a pipe.} | 669 | (let ((process-connection-type nil)) ; @r{use a pipe} |
| 662 | (start-process @dots{})) | 670 | (start-process @dots{})) |
| 663 | @end group | 671 | @end group |
| 664 | @end smallexample | 672 | @end smallexample |
| @@ -675,9 +683,9 @@ Information}). | |||
| 675 | @dfn{Deleting a process} disconnects Emacs immediately from the | 683 | @dfn{Deleting a process} disconnects Emacs immediately from the |
| 676 | subprocess. Processes are deleted automatically after they terminate, | 684 | subprocess. Processes are deleted automatically after they terminate, |
| 677 | but not necessarily right away. You can delete a process explicitly | 685 | but not necessarily right away. You can delete a process explicitly |
| 678 | at any time. If you delete a terminated process explicitly before it | 686 | at any time. If you explicitly delete a terminated process before it |
| 679 | is deleted automatically, no harm results. Deleting a running | 687 | is deleted automatically, no harm results. Deleting a running |
| 680 | process sends a signal to terminate it (and its child processes if | 688 | process sends a signal to terminate it (and its child processes, if |
| 681 | any), and calls the process sentinel if it has one. @xref{Sentinels}. | 689 | any), and calls the process sentinel if it has one. @xref{Sentinels}. |
| 682 | 690 | ||
| 683 | When a process is deleted, the process object itself continues to | 691 | When a process is deleted, the process object itself continues to |