bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7784: executable-find does not find scripts on woe32


From: Eli Zaretskii
Subject: bug#7784: executable-find does not find scripts on woe32
Date: Wed, 05 Jan 2011 18:24:24 +0200

> Date: Wed, 5 Jan 2011 09:40:06 -0500
> From: Sam Steingold <sds@gnu.org>
> Cc: ofv@wanadoo.es, 7784@debbugs.gnu.org
> 
> On Wed, Jan 5, 2011 at 6:26 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> Date: Tue, 4 Jan 2011 23:05:16 -0500
> >> From: Sam Steingold <sds@gnu.org>
> >> Cc: 7784@debbugs.gnu.org
> >>
> >
> > Could you please describe the specific use-case where this issue got
> > in your way?  Because otherwise this discussion sounds a bit academic
> > to me.
> 
> when I try to use cygwin in native windows emacs, this works for
> binaries but not for scripts.
> e.g., using VC with cygwin-provided bzr and hg does not work.

Using any Emacs command that goes through shell-command-* should work
if you configure Emacs to use the Cygwin Bash as the shell.

Emacs commands that invoke programs directly (call/start-process etc.)
will not work with Unix shell scripts, but you can craft trivial *.bat
files that invoke the script via the Cygwin Bash, and put them on
PATH.  E.g., to invoke Cygwin bzr, create a bzr.bat (untested) with
this single line:

 @X:\path\to\cygwin\bash $*

> there is no reason for this not to work except for the
> check_executable()'s return value.

Yes, there is a reason: the native Windows build of Emacs uses native
Windows APIs to run subprocesses, and those APIs don't know how to run
a Unix shell script.

Or maybe I misunderstand the details, in which case please tell more
regarding the Emacs functions which failed (those that eventually
called executable-find) and the relevant error message(s).

In general, though, if you want to use Cygwin tools, I suggest to use
a Cygwin build of Emacs.  Then everything should "just work".






reply via email to

[Prev in Thread] Current Thread [Next in Thread]