From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#36270: executable-find does not find shell commands on MSYS2 Date: Wed, 19 Jun 2019 19:24:01 +0300 Message-ID: <83o92tr1b2.fsf@gnu.org> References: <2lef3rrbaa.fsf@fencepost.gnu.org> <83r27qsuox.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="209687"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36270@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 19 18:38:49 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 1hddbl-000sO5-I0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jun 2019 18:38:49 +0200 Original-Received: from localhost ([::1]:40418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hddbk-0003Bj-H4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jun 2019 12:38:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59510) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hddOR-0003ZG-2B for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 12:25:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hddOQ-0008PJ-1E for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 12:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33811) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hddOP-0008P9-Sx for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 12:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hddOP-0001Pm-Lu for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2019 12:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jun 2019 16:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36270 X-GNU-PR-Package: emacs Original-Received: via spool by 36270-submit@debbugs.gnu.org id=B36270.15609614695390 (code B ref 36270); Wed, 19 Jun 2019 16:25:01 +0000 Original-Received: (at 36270) by debbugs.gnu.org; 19 Jun 2019 16:24:29 +0000 Original-Received: from localhost ([127.0.0.1]:47355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hddNs-0001Os-NO for submit@debbugs.gnu.org; Wed, 19 Jun 2019 12:24:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hddNr-0001Of-5N for 36270@debbugs.gnu.org; Wed, 19 Jun 2019 12:24:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hddNm-00087N-1Q; Wed, 19 Jun 2019 12:24:22 -0400 Original-Received: from [176.228.60.248] (port=2470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hddNf-0006d6-Q8; Wed, 19 Jun 2019 12:24:18 -0400 In-reply-to: (message from Juanma Barranquero on Tue, 18 Jun 2019 22:49:33 +0200) 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:160855 Archived-At: > From: Juanma Barranquero > Date: Tue, 18 Jun 2019 22:49:33 +0200 > Cc: Glenn Morris , 36270@debbugs.gnu.org > > On Tue, Jun 18, 2019 at 6:51 PM Eli Zaretskii wrote: > > > We want to declare a file "executable" only if it can be invoked by _all_ > > possible means of running an executable file. > > Sure. But let's perhaps agree that there's something to be said for > files that are "almost executable". Kids down here have a saying: "almost doesn't count" ;-) > shell-command and variants are used (counting *very* roughly) about > 150 times in the elisp sources, vs. ~300 invocations of > call-process. Exactly. So what would be the point of having a general-purpose API return files that can be useful only with some methods of running a program? It will only cause confusion and bug reports. > > We could > > make the situation a tad better if we add support for the PATHEXT > > environment variable, as suggested in bug#7784, patches welcome. > > I've read the bug thread. What exactly does mean to "add support for > the PATHEXT environment variable"? Making file-executable-p take it > into account? That's one part, but it isn't the most important (nor the hardest) part. > Are files in the path with one of PATHEXT extensions runnable with > call-process? No, PATHEXT is consulted by cmd.exe and AFAIK also the ShellExecute API. So to support that, we will need to change sys_spawnve and/or cmdproxy to detect an extension that appears in PATHEXT, and then either invoke through cmdproxy or use ShellExecute instead of CreateProcess. And this is the more complex part of the job. > 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.