From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: setevn PATH vs exec-path [was Re: Flyspell error] Date: Fri, 07 Aug 2009 12:30:24 +0300 Message-ID: <83r5vom0nj.fsf@gnu.org> References: <66ade717-927b-4304-bf4b-104d0848cc5c@u16g2000pru.googlegroups.com> <844648ac-0b6c-44b0-bfee-ac5f147ce0f9@u38g2000pro.googlegroups.com> <2537dd5a-5644-416b-be14-38877d92bf5c@g1g2000pra.googlegroups.com> <74580316-83d3-4fca-910c-f8faa0935195@t11g2000prh.googlegroups.com> <1e28e3b6-5be0-4d3e-a290-1d18d6812ed2@u16g2000pru.googlegroups.com> <27a6743e-010a-4650-a7f9-823b099aff60@x25g2000prf.googlegroups.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1249637471 28454 80.91.229.12 (7 Aug 2009 09:31:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Aug 2009 09:31:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 07 11:31:04 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MZLmw-0001NS-Ae for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Aug 2009 11:31:02 +0200 Original-Received: from localhost ([127.0.0.1]:52657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZLmv-0000cZ-Kh for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Aug 2009 05:31:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZLmP-0000by-0u for help-gnu-emacs@gnu.org; Fri, 07 Aug 2009 05:30:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZLmN-0000bm-Ph for help-gnu-emacs@gnu.org; Fri, 07 Aug 2009 05:30:28 -0400 Original-Received: from [199.232.76.173] (port=53131 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZLmN-0000bh-D7 for help-gnu-emacs@gnu.org; Fri, 07 Aug 2009 05:30:27 -0400 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:29435) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZLmM-0004s2-Pl for help-gnu-emacs@gnu.org; Fri, 07 Aug 2009 05:30:27 -0400 Original-Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KO000M002EBTP00@i_mtaout2.012.net.il> for help-gnu-emacs@gnu.org; Fri, 07 Aug 2009 12:30:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.126.151.173]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KO000I132EOL410@i_mtaout2.012.net.il> for help-gnu-emacs@gnu.org; Fri, 07 Aug 2009 12:30:25 +0300 (IDT) In-reply-to: <27a6743e-010a-4650-a7f9-823b099aff60@x25g2000prf.googlegroups.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66926 Archived-At: > From: Xah Lee > Date: Wed, 5 Aug 2009 16:51:03 -0700 (PDT) >=20 > For Windows emacs users who uses unix shell, won't there be > exceptions? >=20 > For example, i use emacs on windows, but right now predominately us= es > unix shell cygwin >=20 > when i run =E2=80=9CM-x shell=E2=80=9D in emacs, i don't want my sh= ell to touch any of > the Windows's executables if possible. e.g. i set PATH in emacs in = a > way assuming i'm working in cygwin bash: >=20 > typical paths for unix shell: > "/usr/local/bin" > "/usr/bin" > "/bin" > "/usr/X11R6/bin" > "/cygdrive/c/Windows/Program Files (x86)/PHP/" >=20 > some Windows paths that are i think necessary in order for cygwin t= o > run. > "/cygdrive/c/Windows/system32" > "/cygdrive/c/Windows" > "/cygdrive/c/Windows/System32/Wbem" >=20 > but when i'm not in shell in emacs, i do want Windows emacs to be a= ble > to access any normal Windows's executables, so my exec-path is like > this: >=20 > "C:/cygwin/bin/" > "C:/Program Files (x86)/Emacs/emacs/bin/" > "C:/Program Files (x86)/PHP/" > "C:/Windows/system32/" > "C:/Windows/" > "C:/Windows/System32/Wbem/" >=20 > if i just setenv PATH and just let emacs set exec-path, i think i r= an > into some problems in emacs... that could be i messed something up = in > my setenv PATH... IMO, mixing a native Windows build of Emacs and Cygwin executables that Emacs features need is asking for trouble. You can, of course, make this work, but then you'd need to tinker quite a lot with Emacs features, read their code, and change many defaults to make them work as intended. PATH and exec-path are indeed two settings you will nee= d to put under tight control, to make things work. But I'm sure there are others. I don't recommend such a mix to anyone who needs Emacs on Windows to "just work". If you like Cygwin, simply install the Cygwin build of Emacs and be done. Emacs 23.1 _does_ supported the Cygwin build, and after many years there's again an active maintainer of the Cygwin Emacs. So any problems you find there will probably be fixed without delays. OTOH, if you need to be able to invoke native Windows programs from Emacs, and Cygwin somehow doesn't let you to do that, use native Windows ports exclusively. That is what I do, and I have yet to see = a significant problem that wouldn't be resolved by installing a native Windows port of some utility, or by fixing some bug in Emacs. (For example, yesterday I fixed Calc to allow graphing commands to work with the native Windows port of Gnuplot.) Keeping your work environment uniform and coherent will save you many hours of grief and hair-pulling. Unless, of course, you like to tinker, in which case the mix you have now is the way to go. I'm sur= e you will learn a lot down the road, both about Emacs and about the programs it invokes.