From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#18515: 24.3; Documentation of `call-process' Date: Sat, 01 Apr 2017 23:30:38 -0400 Message-ID: <87vaqnxz8h.fsf@users.sourceforge.net> References: <21534.17398.640167.807129@home.barzilay.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1491103824 23524 195.159.176.226 (2 Apr 2017 03:30:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Apr 2017 03:30:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 18515@debbugs.gnu.org To: Eli Barzilay Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 02 05:30:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuWDX-00054V-FU for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Apr 2017 05:30:15 +0200 Original-Received: from localhost ([::1]:53529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuWDb-0004kj-Rx for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Apr 2017 23:30:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuWDQ-0004gY-Ro for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 23:30:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuWDM-0000if-JW for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 23:30:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuWDM-0000ib-FL for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 23:30:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cuWDM-0008TO-6j for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 23:30:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2017 03:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18515 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18515-submit@debbugs.gnu.org id=B18515.149110376332494 (code B ref 18515); Sun, 02 Apr 2017 03:30:04 +0000 Original-Received: (at 18515) by debbugs.gnu.org; 2 Apr 2017 03:29:23 +0000 Original-Received: from localhost ([127.0.0.1]:56265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuWCh-0008S1-AI for submit@debbugs.gnu.org; Sat, 01 Apr 2017 23:29:23 -0400 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:33665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuWCe-0008Re-Px; Sat, 01 Apr 2017 23:29:21 -0400 Original-Received: by mail-io0-f178.google.com with SMTP id f84so58899620ioj.0; Sat, 01 Apr 2017 20:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=f1K1rSoLcN7Un4tf2y5xuCHr+gGvtAEURBaaS+KieC0=; b=UM34+uAz3pjLWvNXrYUynIWilx1htqOyObHV8rpZ3Oto/fu7B6kJiBKG6r3D2G491o lbgOHgSsnX7ZRxLWVwCsVCO2SOfxOxtM9GmiG7ewY9St+ZmGphlYuvZy+fzeJ1vtIVmv QO0Q3hSkrUjpuhpE5HPYI2QEAo25b8UTbGX+++7LBfCKtbGMPIFZl+i0dzvZcCJPcZ5e 4vBQ4SUoWk+Np0DJkz1pfH4TLIjBOX7JTInxtisO+xcVtoAHdY1LjozT3FuPNnhJZhkL MgxOSvyQnvPDSC12EGBl12Fw27Y/L/of4zLqMzbWS39hzGEn1cHsK0neLRKRtDsNRrR8 Bz/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=f1K1rSoLcN7Un4tf2y5xuCHr+gGvtAEURBaaS+KieC0=; b=sFR8FMQ0PY4fub1CN9fFJTidzjdCdk4cNVKN46tHvcv6TNsIPfzEwVhVp0CwkhvYZD ML5cl/QyPFwbskTvkxO05SsQ6LKBm/rWaCfdX3dKd4Uu3XdQOAYvw2yBRodkAL000GPO w2yEm7vM5MzfMerfDn0XTteLh6SfLRJZlNhXLeWzLZOh3FWn18XqIiGNmnx5koCwjosS CHiALrTX+Uol+QDtd2MuRKWpixe/evZe28tzCD8Y27UCpl4w5ggJWymAHfXz64FpnBib H7MYqvHheN5TSBXiB82h8eqk03yKj54JL8n+XMdS9sKPYSKYy8OVdqiY+PiyviPGVpFl JywQ== X-Gm-Message-State: AFeK/H0djNkq2P9EjBPjVeWsizalsZrmQP/o/NCBQLOOITiqbgqlk1kJFMcgzW3aPzn6DQ== X-Received: by 10.107.6.211 with SMTP id f80mr10359166ioi.96.1491103755281; Sat, 01 Apr 2017 20:29:15 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id x26sm5709666ioi.5.2017.04.01.20.29.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Apr 2017 20:29:14 -0700 (PDT) In-Reply-To: <21534.17398.640167.807129@home.barzilay.org> (Eli Barzilay's message of "Sat, 20 Sep 2014 23:20:22 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131198 Archived-At: --=-=-= Content-Type: text/plain tags 18515 patch quit Eli Barzilay 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? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Mention-that-processes-start-in-default-directory.patch Content-Description: patch >From af7d3558d8557569c6d39b4dbf0e8cd53e8367f3 Mon Sep 17 00:00:00 2001 From: Noam Postavsky 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 --=-=-=--