GNU bug report logs -
#18515
Document call-process behaviour with respect to default-directory
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Sun, 21 Sep 2014 03:35:01 UTC
Severity: minor
Tags: fixed, patch
Found in version 24.3
Fixed in version 25.2
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
tags 18515 patch
quit
Eli Barzilay <eli <at> 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?
[v1-0001-Mention-that-processes-start-in-default-directory.patch (text/x-diff, inline)]
From af7d3558d8557569c6d39b4dbf0e8cd53e8367f3 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> 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
This bug report was last modified 8 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.