aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-04-14 18:58:41 -0700
committerGlenn Morris2012-04-14 18:58:41 -0700
commit12acf78334a9a2ea17a083c7aac93d3e5246ace1 (patch)
tree76af1b0c8545719741e7d267e2a8dd5e890d4bd2
parente153c136436ff5eb106e51284914cb580ba23774 (diff)
downloademacs-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/ChangeLog6
-rw-r--r--doc/lispref/processes.texi54
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 @@
12012-04-15 Glenn Morris <rgm@gnu.org> 12012-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
562line arguments for the program. 563line arguments for the program.
563 564
564In the example below, the first process is started and runs (rather, 565In the example below, the first process is started and runs (rather,
565sleeps) for 100 seconds. Meanwhile, the second process is started, and 566sleeps) for 100 seconds (the output buffer @samp{foo} is created
567immediately). Meanwhile, the second process is started, and
566given the name @samp{my-process<1>} for the sake of uniqueness. It 568given the name @samp{my-process<1>} for the sake of uniqueness. It
567inserts the directory listing at the end of the buffer @samp{foo}, 569inserts the directory listing at the end of the buffer @samp{foo},
568before the first process finishes. Then it finishes, and a message to 570before 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 ----------
583total 2 585total 8336
584lrwxrwxrwx 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
587Process my-process<1> finished 591Process 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
596Like @code{start-process}, this function starts a new asynchronous 600Like @code{start-process}, this function starts a new asynchronous
597subprocess running @var{program} in it, and returns its process 601subprocess running @var{program} in it, and returns its process
598object---when @code{default-directory} is not a magic file name. 602object.
599 603
600If @code{default-directory} is magic, the function invokes its file 604The difference from @code{start-process} is that this function may
601handler instead. This handler ought to run @var{program}, perhaps on 605invoked a file handler based on the value of @code{default-directory}.
602the local host, perhaps on a remote host that corresponds to 606This handler ought to run @var{program}, perhaps on the local host,
603@code{default-directory}. In the latter case, the local part of 607perhaps on a remote host that corresponds to @code{default-directory}.
604@code{default-directory} becomes the working directory of the process. 608In the latter case, the local part of @code{default-directory} becomes
609the working directory of the process.
605 610
606This function does not try to invoke file name handlers for 611This 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
609Depending on the implementation of the file handler, it might not be 614Depending on the implementation of the file handler, it might not be
610possible to apply @code{process-filter} or @code{process-sentinel} to 615possible to apply @code{process-filter} or @code{process-sentinel} to
611the resulting process object (@pxref{Filter Functions}, @pxref{Sentinels}). 616the 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).
613Some file handlers may not support @code{start-file-process} (for 620Some file handlers may not support @code{start-file-process} (for
614example @code{ange-ftp-hook-function}). In such cases, the function 621example the function @code{ange-ftp-hook-function}). In such cases,
615does nothing and returns @code{nil}. 622this 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
619This function is like @code{start-process} except that it uses a shell 626This function is like @code{start-process}, except that it uses a shell
620to execute the specified command. The argument @var{command} is a shell 627to execute the specified command. The argument @var{command} is a shell
621command name. The variable @code{shell-file-name} specifies which shell to 628command name. The variable @code{shell-file-name} specifies which shell to
622use. 629use.
623 630
624The point of running a program through the shell, rather than directly 631The point of running a program through the shell, rather than directly
625with @code{start-process}, is so that you can employ shell features such 632with @code{start-process}, is so that you can employ shell features such
626as wildcards in the arguments. It follows that if you include an 633as wildcards in the arguments. It follows that if you include any
627arbitrary user-specified arguments in the command, you should quote it 634arbitrary user-specified arguments in the command, you should quote them
628with @code{shell-quote-argument} first, so that any special shell 635with @code{shell-quote-argument} first, so that any special shell
629characters do @emph{not} have their special shell meanings. @xref{Shell 636characters do @emph{not} have their special shell meanings. @xref{Shell
630Arguments}. 637Arguments}. Of course, when executing commands based on user input
638you 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
634This function is like @code{start-process-shell-command}, but uses 642This 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}
636executed also on remote hosts, depending on @code{default-directory}. 644can 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
676subprocess. Processes are deleted automatically after they terminate, 684subprocess. Processes are deleted automatically after they terminate,
677but not necessarily right away. You can delete a process explicitly 685but not necessarily right away. You can delete a process explicitly
678at any time. If you delete a terminated process explicitly before it 686at any time. If you explicitly delete a terminated process before it
679is deleted automatically, no harm results. Deleting a running 687is deleted automatically, no harm results. Deleting a running
680process sends a signal to terminate it (and its child processes if 688process sends a signal to terminate it (and its child processes, if
681any), and calls the process sentinel if it has one. @xref{Sentinels}. 689any), 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