emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/doc/lispref/processes.texi,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/doc/lispref/processes.texi,v
Date: Mon, 20 Oct 2008 19:47:55 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/10/20 19:47:55

Index: processes.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/processes.texi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- processes.texi      19 Oct 2008 12:27:24 -0000      1.9
+++ processes.texi      20 Oct 2008 19:47:54 -0000      1.10
@@ -194,6 +194,43 @@
 @end example
 @end defun
 
address@hidden quoting and unquoting shell command line
+  The following two functions help creating shell commands from
+individual argument strings and taking shell command lines apart into
+individual arguments.
+
address@hidden split-string-and-unquote string &optional separators
+This function splits @var{string} into substrings at matches for the
+regular expression @var{separators}, like @code{split-string} does
+(@pxref{Creating Strings}), but it additionally removes quoting from
+the substrings.  It then makes a list of the substrings and returns
+it.
+
+If @var{separators} is omitted or nil, it defaults to @code{"\\s-+"},
+which is a regular expression that matches one or more characters with
+whitespace syntax (@pxref{Syntax Class Table}).
+
+The quoting this function supports is of 2 styles: by enclosing a
+whole string in double quotes @code{"@dots{}"}, or by quoting
+individual characters with a backslash escape @samp{\}.  The latter is
+also used in Lisp strings, so this function can handle those as well.
address@hidden defun
+
address@hidden combine-and-quote-strings list-of-strings &optional separator
+This function concatenates @var{list-of-strings} into a single string,
+quoting each string in the list that needs quoting as it goes.  It
+also sticks the @var{separator} string in between each pair of strings
+in the result, and returns that result.  If @var{separator} is omitted
+or @code{nil}, it defaults to a blank @code{" "}.
+
+The strings in @var{list-of-strings} that need quoting are those that
+include @var{separator} as their substring.  Quoting a string encloses
+it in double quotes @code{"@dots{}"}.  In the simplest case, if you
+are consing a shell command from the individual command-line
+arguments, every argument that includes embedded blanks will be
+quoted.
address@hidden defun
+
 @node Synchronous Processes
 @section Creating a Synchronous Process
 @cindex synchronous subprocess




reply via email to

[Prev in Thread] Current Thread [Next in Thread]