]> git.eshelyaron.com Git - emacs.git/commitdiff
Mention that processes start in default-directory (Bug#18515)
authorNoam Postavsky <npostavs@gmail.com>
Sun, 2 Apr 2017 03:15:46 +0000 (23:15 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 6 Apr 2017 22:50:54 +0000 (18:50 -0400)
* doc/lispref/processes.texi (Synchronous Processes):
(Asynchronous Processes):
* lisp/subr.el (start-process):
* src/callproc.c (call-process): Mention that the subprocess starts in
`default-directory' when local, suggest `start-file-process' and
`process-file' otherwise.

doc/lispref/processes.texi
lisp/subr.el
src/callproc.c

index 2a79cc781f815629819248452a2cb17d949eae8a..2acb7c99e0212c24a7f89924cd6d90030c12ce61 100644 (file)
@@ -300,8 +300,11 @@ system, much like text written into a file.  @xref{Coding Systems}.
 @defun call-process program &optional infile destination display &rest args
 This function calls @var{program} and waits for it to finish.
 
-The current working directory of the subprocess is
-@code{default-directory}.
+The current working directory of the subprocess is set to the current
+buffer's value of @code{default-directory} if that is local (as
+determined by @code{unhandled-file-name-directory}), or "~" otherwise.
+If you want to run a process in a remote directory use
+@code{process-file}.
 
 The standard input for the new process comes from file @var{infile} if
 @var{infile} is not @code{nil}, and from the null device otherwise.
@@ -677,6 +680,12 @@ created with @code{make-pipe-process}, described below.
 
 The original argument list, modified with the actual connection
 information, is available via the @code{process-contact} function.
+
+The current working directory of the subprocess is set to the current
+buffer's value of @code{default-directory} if that is local (as
+determined by `unhandled-file-name-directory'), or "~" otherwise.  If
+you want to run a process in a remote direcotry use
+@code{start-file-process}.
 @end defun
 
 @defun make-pipe-process &rest args
index ebac2e0ef5da6d96bca2db377eda839db6a242c9..472f931306ecb3352b1e3527a4a778c33161dbfa 100644 (file)
@@ -1970,7 +1970,12 @@ arguments PROGRAM-ARGS are strings to give program as arguments.
 
 If you want to separate standard output from standard error, use
 `make-process' or invoke the command through a shell and redirect
-one of them using the shell syntax."
+one of them using the shell syntax.
+
+The process runs in `default-directory' if that is local (as
+determined by `unhandled-file-name-directory'), or \"~\"
+otherwise.  If you want to run a process in a remote directory
+use `start-file-process'."
   (unless (fboundp 'make-process)
     (error "Emacs was compiled without subprocess support"))
   (apply #'make-process
index 6d69e13757f5f0ee31c658e5c5aca2417f1ecb3b..a781e47b1715f4468f4b80aa86aa375438aad1b4 100644 (file)
@@ -240,6 +240,10 @@ Otherwise it waits for PROGRAM to terminate
 and returns a numeric exit status or a signal description string.
 If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
 
+The process runs in `default-directory' if that is local (as
+determined by `unhandled-file-name-directory'), or "~" otherwise.  If
+you want to run a process in a remote directory use `process-file'.
+
 usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {