Subject: Re: bug#18515: 24.3; Documentation of `call-process'

From: [email-masked]
Date: Sat, 01 Apr 2017 23:30:38 -0400

tags 18515 patch
quit

Eli Barzilay <[email-masked]> writes:
>
> Eventually, I noticed that the delay happens only when I have a file
> open over sshfs -- and then I wrapped the `call-process' with a
> (let ((default-directory "/")) ...) and all is well.  A note about
> switching to the directory in the documentation of `call-process', or
> even just a mention of the directory in which it runs could have saved
> me that chase...

It's easy enough to add that of course, though I wonder if it really
would have helped.  What other directory would the process run in?

>From af7d3558d8557569c6d39b4dbf0e8cd53e8367f3 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <[email-masked]>
Date: Sat, 1 Apr 2017 23:15:46 -0400
Subject: [PATCH v1] Mention that processes start in default-directory
 (Bug#18515)

* lisp/subr.el (start-process):
* src/callproc.c (call-process): Mention that process starts in
`default-directory'.
---
 lisp/subr.el   | 4 +++-
 src/callproc.c | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index ebac2e0ef5..0c9c852370 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1970,7 +1970,9 @@ start-process
 
 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'."
   (unless (fboundp 'make-process)
     (error "Emacs was compiled without subprocess support"))
   (apply #'make-process
diff --git a/src/callproc.c b/src/callproc.c
index 6d69e13757..1c37fa7054 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -239,6 +239,7 @@ t (mix it with ordinary output), or a file name string.
 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'.
 
 usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
-- 
2.11.1