delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/12/11:17:50

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3A5F2D02.2F64A150@digitalfocus.com>
Date: Fri, 12 Jan 2001 11:12:50 -0500
From: Daniel Barclay <Daniel DOT Barclay AT digitalfocus DOT com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: how to set CYGWIN variable for Emacs

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?

Thanks,
Daniel
-- 
Daniel Barclay
Digital Focus
Daniel DOT Barclay AT digitalfocus DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019