I am successfully running Emacs from a portable drive (USB stick) but when I try to use diff functions I run into trouble. I've installed cygwin and it works with Emacs when I add the path to diff.exe to the environmental variable PATH in Windows. The problem is that with that approach I have to edit the environmental variables on every computer I'd like to use. No good.
Then I tried to add it to the path variable from within my site-start.el. The path is added when i examine the variable from within Emacs but still Emacs can't find the diff tool.
Does anyone have any ideas how to solve this?
Thanks in advance
-- Martin
Edit: My site-lisp.el looks like this now and nothing has worked so far (except for adding the path manually to the PATH environmental variable):
;
; Get drive letter
;
(defvar usb-drive-letter (substring data-directory 0 2))
;
; Add cygwin-folder to path and exec-path
;
(defvar cygwin-folder (concat usb-drive-letter "/PortableApps/CygwinPortable/App/Cygwin/bin/"))
(setenv "PATH" (concat (getenv "PATH") ";" cygwin-folder))
(setq exec-path (append exec-path cygwin-folder))
My folders are as follows:
[root of usb stick]
\PortableApps\Emacs\bin (including runemacs.exe)
\PortableApps\CygwinPortable\App\Cygwin\bin (including diff.exe)
I ended up moving diff.exe to the Emacs bin-folder instead. Nothing else I've found is working. Now my only problem is the bloody nodosfilewarning variable to stop cygwin complain on my ms-dos paths...
Cheers