GNU bug report logs - #36270
executable-find does not find shell commands on MSYS2

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Mon, 17 Jun 2019 23:44:01 UTC

Severity: wishlist

Merged with 7784

Full log


Message #21 received at 36270 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 36270 <at> debbugs.gnu.org
Subject: Re: bug#36270: executable-find does not find shell commands on MSYS2
Date: Tue, 18 Jun 2019 22:49:33 +0200
On Tue, Jun 18, 2019 at 6:51 PM Eli Zaretskii <eliz <at> gnu.org> 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". shell-command and variants are
used (counting *very* roughly) about 150 times in the elisp sources,
vs. ~300 invocations of call-process.

> 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? Are files in the path with one of PATHEXT extensions
runnable with call-process?

> I might be okay with adding a new function, shell-executable-find,
> say.  But we must first define what that means, exactly, and whether
> it's feasible to implement something like that with reasonable effort
> and complexity.

Yeah, no rush.

> Meanwhile, just set up trivial batch file wrappers for your shell
> scripts, and Bob's your uncle.

Sure. My shell scripts weren't the problem, anyhow. I know how to work
around the issue.

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.




This bug report was last modified 5 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.