Subject: Re: [h-e-w] RE: Can't seem to get bash to work in NTEmacs
From: Karel Sprenger <[email-masked]>
To: "Jeff Rancier" <[email-masked]>
Cc: "Eric Hanchrow" <[email-masked]>, "Emacs Help (Windows)" <[email-masked]>, "Cygwin" <[email-masked]>
Date: 15 Oct 2001 20:30:28 +0200

Hi,

>>> On Mon, 15 Oct 2001 14:13:55 -0400, Jeff Rancier (Jeff) wrote:
Jeff> 
Jeff> I tried the following in emacs -q, and it does work.
Jeff> (setq exec-path (cons "C:/cygwin/bin" exec-path))
Jeff> (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
Jeff> (setq process-coding-system-alist '(("bash" . undecided-unix)))
Jeff> (setq w32-quote-process-args ?\")
Jeff> (setq shell-file-name "c:/cygwin/bin/bash.exe")
Jeff> (setenv "SHELL" shell-file-name)
Jeff> (setq explicit-shell-file-name shell-file-name)
Jeff> (add-hook 'comint-output-filter-functions
Jeff>           'comint-strip-ctrl-m)
Jeff> 
Jeff> So I just need to somehow figure out what's stepping on what?
Jeff> 

In my .emacs I have the following

;; Add proc-filter-shell-output-filter to get rid of ^M in shells
(require 'proc-filters)
(add-hook 'comint-output-filter-functions 'proc-filter-shell-output-filter)
(if (eq system-type 'windows-nt)
    (progn
      (setenv "PID" nil)
      (setq w32-quote-process-args ?\")
      (setq process-coding-system-alist
	    (cons '("bash" . (raw-text-unix . raw-text-unix))
		  process-coding-system-alist))
      ))

proc-filters.el, containing some generally useful process filters, is written
by Noah Friedman <[email-masked]>.  With these in place and SHELL set to
"bash" my shell under emacs works just great.

Cheers,
Karel

-- 
Karel Sprenger, solution architect
COMPAQ, Professional Services
Phone:  +31 (30) 283 4542           Private: +31 (20) 670 0942
E-mail: [email-masked]   Private: [email-masked]
"Showing off is a fool's idea of glory." -- Bruce Lee

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/