help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] Re: How to tell (windows) emacs which ftp.exe, ediff.exe, gr


From: Guy Worthington
Subject: Re: [h-e-w] Re: How to tell (windows) emacs which ftp.exe, ediff.exe, grep.exe... files to use
Date: 02 Mar 2003 11:38:54 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Galen Boyer wrote:
> address@hidden wrote:

> > Good afternoon, Would someone know and could please tell me, how
> > to tell emacs where to find the ftp.exe, ediff.exe, grep.exe
> > executables it needs to use to access remote files, execute diffs or
> > grep commands?

> Do you understand the concept of an OS path, but you would like to know
> how to do this exclusively in Emacs, or do you not understand PATH and
> really just want that this is enabled?  (The explanation for these two
> would be different)

Funny you should ask that question, I've never understood how to
inherit the PATH environment variable from windows.  Eventually I just
gave up trying to inherit common environment variables and I now just
consider emacs as a completely independent shell (i.e. independent
from the windows shell), and manually set all paths for executables
that I want to operate from within emacs.

In the following code snippet, you'll see all the paths to executables
are manually set from within emacs.  The reason I've gone to so much
trouble is that previously I had name collisions.  For instance,
my win2K box has an ftp.exe installed in the path c:\WINNT\system32,
and also an ftp.exe installed in the path c:\cygwin\bin, to avoid a
name collision, I've specifically included the c:\cygwin\bin, (and
I've not included a path c:\WINNT\system32).

So if you add a suitably modified version of the code below to your
.emacs, you should be able to run the Cygwin tools (and other tools
you'd like to run within emacs).

-----

;; set exec-path explicitly, and then Sync exec-path to PATH
(setq exec-path '("c:/emacs-21.2/bin/"
                  "c:/local/TeX/bin/win32/"
                  "c:/gs/gs8.00/bin/"
                  "c:/gs/Ghostgum/gsview/"
                  "c:/Java/j2SDK1.4.0_01/bin/"
                  "c:/Java/jakarta-ant-1.5.1/bin/"
                  "c:/Perl/bin/"
                  "c:/Cygwin/bin/"
                  "c:/Cygwin/usr/local/bin/"))
(setenv "PATH" (mapconcat 'identity exec-path path-separator))

-----

P.S. I don't use tools such as etags.exe, so I'm not sure how you
avoid name collisions, for the handfull of tools that emacs and Cygwin
have in common.






reply via email to

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