emacs-devel
[Top][All Lists]
Advanced

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

Re: Wrong PATH in MSYS2/MINGW64 builds?


From: Eli Zaretskii
Subject: Re: Wrong PATH in MSYS2/MINGW64 builds?
Date: Thu, 28 May 2015 20:09:39 +0300

> From: Yuri Khan <address@hidden>
> Date: Thu, 28 May 2015 22:52:16 +0600
> Cc: Óscar Fuentes <address@hidden>, 
>       Emacs developers <address@hidden>
> 
> On Thu, May 28, 2015 at 10:37 PM, Eli Zaretskii <address@hidden> wrote:
> >> From: Óscar Fuentes <address@hidden>
> >>
> >> I would expect from Emacs to be able to execute the applications that
> >> reside on the same directory as emacs.exe.
> >
> > Why would you expect that?
> 
> Because it's the default native behavior on Windows?
> 
> ===
> $ msdn CreateProcess

Why would you think Emacs should invoke CreateProcess with just
"bzip2" as the program name?

Please have a look at the implementation of call-process, and you will
see that Emacs searches for the program in platform-independent
application code, long before it gets to low-level Windows-specific
code (which just emulates Posix fork/exec).  By the time we get to
CreateProcess, the program file name is supposed to be already found
and converted to an absolute file name.

IOW, Emacs behaves consistently on all supported platforms, and tries
to keep OS-specific issues and tricks out.  In particular, Emacs
_never_ relies on the current directory of the Emacs process (that's
why it always calls expand-file-name or its equivalent, before passing
file names to low-level APIs).




reply via email to

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