From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Wrong PATH in MSYS2/MINGW64 builds? Date: Thu, 28 May 2015 20:09:39 +0300 Message-ID: <83r3q0wrvw.fsf@gnu.org> References: <55671E77.8030404@alice.it> <834mmwyc0i.fsf@gnu.org> <87fv6gaf4r.fsf@wanadoo.es> <83y4k8wtdd.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1432833011 3444 80.91.229.3 (28 May 2015 17:10:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 May 2015 17:10:11 +0000 (UTC) Cc: ofv@wanadoo.es, emacs-devel@gnu.org To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 28 19:10:02 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yy1Je-0004pW-LW for ged-emacs-devel@m.gmane.org; Thu, 28 May 2015 19:09:58 +0200 Original-Received: from localhost ([::1]:60083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy1Jd-0000c0-Sh for ged-emacs-devel@m.gmane.org; Thu, 28 May 2015 13:09:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy1JW-0000Z0-N4 for emacs-devel@gnu.org; Thu, 28 May 2015 13:09:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy1JT-0007GQ-GO for emacs-devel@gnu.org; Thu, 28 May 2015 13:09:50 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:45414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy1JT-0007G9-7p for emacs-devel@gnu.org; Thu, 28 May 2015 13:09:47 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NP200E00KY74500@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 28 May 2015 20:09:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NP200EC1L092Z20@a-mtaout23.012.net.il>; Thu, 28 May 2015 20:09:45 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186927 Archived-At: > From: Yuri Khan > Date: Thu, 28 May 2015 22:52:16 +0600 > Cc: =C3=93scar Fuentes ,=20 > =09Emacs developers >=20 > On Thu, May 28, 2015 at 10:37 PM, Eli Zaretskii wrot= e: > >> From: =C3=93scar Fuentes > >> > >> 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? >=20 > Because it's the default native behavior on Windows? >=20 > =3D=3D=3D > $ 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 wil= l 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 passin= g file names to low-level APIs).