views:

174

answers:

2

Has anyone set up cygwin and some emacs to work well under a 64-bit Windows 7?

I tried downloading cygwin recently, and by default not even dired works reliably, there are odd shell prompt characters, I get a lot of warnings, in one case C-c was read as C-g and caused various errors. (Neither xemacs nor emacs worked for me, where by "work" I mean that dired and shell work, and without warnings).

I just want the usual emacs development tools: gdb-mode, shell-mode, compiling, tag-search to work as normal.

I was hoping someone who has done this recently with cygwin could share whatever relevant shell files, emacs files, environment variables, and so on to make this all work. Should all these things just work out of the box?

A: 

I use a hideous Frankenstein mix of "native" Win32 emacs (http://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-23.1.97-bin-i386.zip is the latest, but I'm using an older version) and Cygwin -- for bash, find, etc. It's taken me years to tweak things to my liking, and it's still a pretty bumpy experience.

Anyway it's worth trying.

offby1
+1  A: 

You should check out ntemacs, with this code in your .emacs everything is working great with cygwin:

;; -- sets up cygwin
(let* ((cygwin-root "c:/cygwin")
  (cygwin-bin (concat cygwin-root "/bin")))
(when (and (eq 'windows-nt system-type)
  (file-readable-p cygwin-root))
(setq exec-path (cons cygwin-bin exec-path))
(setenv "PATH" (concat cygwin-bin ";" (getenv "PATH")))
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name) 
(setq explicit-shell-file-name shell-file-name) 
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)))
openist