From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: execute shell scripts by call-process in msys2 environment Date: Wed, 12 Sep 2018 20:03:29 +0300 Message-ID: <83worqlkbi.fsf@gnu.org> References: <83c503fb-eb42-46e0-a035-08a7879a2259@googlegroups.com> <6d64819d-1a0f-4dfe-bdf0-fa17df068bc7@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536771739 8157 195.159.176.226 (12 Sep 2018 17:02:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2018 17:02:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 19:02:15 2018 Return-path: Envelope-to: geh-help-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 1g08Ws-00021H-Oe for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Sep 2018 19:02:14 +0200 Original-Received: from localhost ([::1]:37294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g08Yz-0002G2-7b for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Sep 2018 13:04:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g08YG-0002FI-Jp for help-gnu-emacs@gnu.org; Wed, 12 Sep 2018 13:03:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g08YD-0003cZ-62 for help-gnu-emacs@gnu.org; Wed, 12 Sep 2018 13:03:40 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g08YC-0003cP-V1 for help-gnu-emacs@gnu.org; Wed, 12 Sep 2018 13:03:37 -0400 Original-Received: from [176.228.60.248] (port=3428 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g08YC-0004f0-Gm for help-gnu-emacs@gnu.org; Wed, 12 Sep 2018 13:03:36 -0400 In-reply-to: (holgar.sperr@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117872 Archived-At: > Date: Wed, 12 Sep 2018 09:31:52 -0700 (PDT) > From: holgar.sperr@gmail.com > > C-x v v initializes a process: (call-process ...) which leads to an error. > > apply: Searching for program: No such file or directory, ci > > Doing M-! (shell-command) finds the script 'ci' of the msys2 installation > and returns the same output as called from mingw64 shell. > > ('exec-path' contains the relevant directory.) OK, thanks. On Unix, call-process is capable of running shell scripts, but Windows doesn't know how to do that based on the #! signature of the script. So it doesn't work out of the box. However, you could write a simple 'ci.bat' batch file that executes the same command as the 'ci' the shell script, then it should work without the need to involve Bash.