At 11:12 AM 1/12/2001, Daniel Barclay wrote:
>What's the recommended way to set the CYGWIN environment variable
>when running in an NTEmacs shell buffer?
>
>The CygWin FAQ gives instructions at 
>http://sources.redhat.com/cygwin/faq/faq.html#SEC54:
>
>   ...you need to add the following code to your ~/.emacs or ~/_emacs file 
>   in order to use bash. ... 
>
>         ;; This assumes that Cygwin is installed in C:\cygwin (the
>         ;; default) and that C:\cygwin\bin is not already in your
>         ;; Windows Path (it generally should not be).
>         ;;
>         (setq exec-path (cons "C:/cygwin/bin" exec-path))
>         (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
>         ;;
>         ;; NT-emacs assumes a Windows command shell, which you change
>         ;; here.
>         ;;
>         (setq process-coding-system-alist '(("bash" . undecided-unix)))
>         (setq w32-quote-process-args ?\")
>         (setq shell-file-name "bash")
>         (setenv "SHELL" shell-file-name) 
>         (setq explicit-shell-file-name shell-file-name) 
>         ;;
>         ;; This removes unsightly ^M characters that would otherwise
>         ;; appear in the output of java applications.
>         ;;
>         (add-hook 'comint-output-filter-functions
>                   'comint-strip-ctrl-m)
>
>
>However, this seems to run bash directly, bypassing the cygwin.bat
>file.
>
>Should Emacs run cygwin.bat directly?  Should the CYGWIN variable be
>set in some place other than cygwin.bat (e.g., in Emacs or in the
>NT environment) so that it gets set even if cygwin.bat isn't run?



Some of the settings in CYGWIN are read by cygwin1.dll only at DLL 
initialization time.  As a result, it is generally recommended that you
set CYGWIN *before* any Cygwin-dependent application runs (i.e. so that
the DLL is not loaded and the changes take affect when the next app is 
run).  This is really the only rule about how and where CYGWIN should be
set.  Feel free to set it in your control panel (on NT/W2K) or autoexec.bat
(on Win 9x's) if you want.



Larry Hall                              [EMAIL PROTECTED]
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

Reply via email to