From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#36270: executable-find does not find shell commands on MSYS2 Date: Wed, 19 Jun 2019 18:38:02 +0100 Message-ID: References: <2lef3rrbaa.fsf@fencepost.gnu.org> <83r27qsuox.fsf@gnu.org> <83o92tr1b2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="246805"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: 36270@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 19 19:44:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hdedF-001239-HI for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jun 2019 19:44:25 +0200 Original-Received: from localhost ([::1]:40808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdedD-0002Yo-Ve for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jun 2019 13:44:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49930) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdecA-0002Ur-Ng for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:43:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdebx-0006um-2x for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:43:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdebu-0006s0-6b for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hdebu-0003St-10 for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:43:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jun 2019 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36270 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156096616713293 (code B ref -1); Wed, 19 Jun 2019 17:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jun 2019 17:42:47 +0000 Original-Received: from localhost ([127.0.0.1]:47391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hdebe-0003SL-OQ for submit@debbugs.gnu.org; Wed, 19 Jun 2019 13:42:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hdebc-0003SC-2s for submit@debbugs.gnu.org; Wed, 19 Jun 2019 13:42:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49538) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdebb-0002QN-3R for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:42:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdeXP-0004w9-PH for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:38:24 -0400 Original-Received: from [195.159.176.226] (port=50040 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hdeXP-0004hj-Ez for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 13:38:23 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hdeXC-000uoj-W9 for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 19:38:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:3L6ZdPO5v8hnmLdEIRdVRnN5Q5Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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:160857 Archived-At: On Wed 19 Jun 2019, Eli Zaretskii wrote: >> From: Juanma Barranquero >> I stumbled upon this because I was trying to understand failures in >> vc-tests.el on Windows, and the reason is that it calls call-process >> to run some shell scripts, like ci. I'd like to fix that and run the >> tests, but I haven't really stared at it long enough to know if >> there's any non-ugly fix. > > One non-ugly fix is to use RCS from the ezwinports site. The binaries > there are 32-bit, but I don't think it will make any difference. I use the following advice in a Windows build of emacs to get shell scripts working for Cygwin. MSYS2 should be similar, with a suitable setting for `shell-file-name': (defun call-process:filter-args (args) "Ensure native Windows emacs can run shell script programs." (let ((program (nth 0 args))) (if (executable-find program) args (list shell-file-name (nth 1 args) (nth 2 args) (nth 3 args) shell-command-switch (mapconcat #'shell-quote-argument (append (list program) (nthcdr 4 args)) " "))))) (advice-add 'call-process :filter-args #'call-process:filter-args) (defun make-process:filter-args (args) "Ensure native Windows emacs can run shell script programs." (let* ((command (plist-get args :command))) (if (executable-find (car command)) args (plist-put args :command (list shell-file-name shell-command-switch (mapconcat #'shell-quote-argument command " ")))))) (advice-add 'make-process :filter-args #'make-process:filter-args)) Perhaps something similar could be added for Windows builds. AndyM