diff options
| author | Stefan Monnier | 2010-12-13 10:27:36 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-13 10:27:36 -0500 |
| commit | f49d1f52b2e368ef67dcfececd426de958548f4e (patch) | |
| tree | ce24ced92f2acc976daf4b69e3634c8bd600e44e /doc/lispref/processes.texi | |
| parent | 07176b2a9e63a0d3933b167f987475d8a18da5cc (diff) | |
| parent | 11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 (diff) | |
| download | emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.tar.gz emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.zip | |
Merge from emacs-23
Diffstat (limited to 'doc/lispref/processes.texi')
| -rw-r--r-- | doc/lispref/processes.texi | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 89f97f99de3..cb67d628947 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -195,10 +195,18 @@ a shell command: | |||
| 195 | @end example | 195 | @end example |
| 196 | @end defun | 196 | @end defun |
| 197 | 197 | ||
| 198 | @cindex quoting and unquoting shell command line | 198 | @cindex quoting and unquoting command-line arguments |
| 199 | The following two functions are useful for creating shell commands | 199 | @cindex minibuffer input, and command-line arguments |
| 200 | from individual argument strings, and taking shell command lines apart | 200 | @cindex @code{call-process}, command-line arguments from minibuffer |
| 201 | into individual arguments. | 201 | @cindex @code{start-process}, command-line arguments from minibuffer |
| 202 | The following two functions are useful for combining a list of | ||
| 203 | individual command-line argument strings into a single string, and | ||
| 204 | taking a string apart into a list of individual command-line | ||
| 205 | arguments. These functions are mainly intended to be used for | ||
| 206 | converting user input in the minibuffer, a Lisp string, into a list of | ||
| 207 | string arguments to be passed to @code{call-process} or | ||
| 208 | @code{start-process}, or for the converting such lists of arguments in | ||
| 209 | a single Lisp string to be presented in the minibuffer or echo area. | ||
| 202 | 210 | ||
| 203 | @defun split-string-and-unquote string &optional separators | 211 | @defun split-string-and-unquote string &optional separators |
| 204 | This function splits @var{string} into substrings at matches for the | 212 | This function splits @var{string} into substrings at matches for the |
| @@ -210,7 +218,7 @@ If @var{separators} is omitted or @code{nil}, it defaults to | |||
| 210 | @code{"\\s-+"}, which is a regular expression that matches one or more | 218 | @code{"\\s-+"}, which is a regular expression that matches one or more |
| 211 | characters with whitespace syntax (@pxref{Syntax Class Table}). | 219 | characters with whitespace syntax (@pxref{Syntax Class Table}). |
| 212 | 220 | ||
| 213 | This function performs two types of quoting: enclosing a whole string | 221 | This function supports two types of quoting: enclosing a whole string |
| 214 | in double quotes @code{"@dots{}"}, and quoting individual characters | 222 | in double quotes @code{"@dots{}"}, and quoting individual characters |
| 215 | with a backslash escape @samp{\}. The latter is also used in Lisp | 223 | with a backslash escape @samp{\}. The latter is also used in Lisp |
| 216 | strings, so this function can handle those as well. | 224 | strings, so this function can handle those as well. |
| @@ -226,9 +234,8 @@ resulting string. | |||
| 226 | The strings in @var{list-of-strings} that need quoting are those that | 234 | The strings in @var{list-of-strings} that need quoting are those that |
| 227 | include @var{separator} as their substring. Quoting a string encloses | 235 | include @var{separator} as their substring. Quoting a string encloses |
| 228 | it in double quotes @code{"@dots{}"}. In the simplest case, if you | 236 | it in double quotes @code{"@dots{}"}. In the simplest case, if you |
| 229 | are consing a shell command from the individual command-line | 237 | are consing a command from the individual command-line arguments, |
| 230 | arguments, every argument that includes embedded blanks will be | 238 | every argument that includes embedded blanks will be quoted. |
| 231 | quoted. | ||
| 232 | @end defun | 239 | @end defun |
| 233 | 240 | ||
| 234 | @node Synchronous Processes | 241 | @node Synchronous Processes |