bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: npostavs
Subject: bug#18515: 24.3; Documentation of `call-process'
Date: Sat, 01 Apr 2017 23:30:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

tags 18515 patch
quit

Eli Barzilay <eli@barzilay.org> 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 <npostavs@gmail.com>
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


reply via email to

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