Skip to content

Instantly share code, notes, and snippets.

@jsulak
Created February 12, 2012 19:32
Show Gist options
  • Save jsulak/1810399 to your computer and use it in GitHub Desktop.
Save jsulak/1810399 to your computer and use it in GitHub Desktop.
Emacs windows configuration
;; 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")))
;; Prevent issues with the Windows null device (NUL)
;; when using cygwin find with rgrep.
(defadvice grep-compute-defaults (around grep-compute-defaults-advice-null-device)
"Use cygwin's /dev/null as the null-device."
(let ((null-device "/dev/null"))
ad-do-it))
(ad-activate 'grep-compute-defaults)
;; NT-emacs assumes a Windows command shell, which you change
;; here.
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
(setq ediff-shell shell-file-name)
(setq explicit-sh-args '("--login" "-i"))
;; Set up cygwin-mount
(require 'cygwin-mount)
(cygwin-mount-activate)
;;; Add Cygwin Info pages
(setq Info-default-directory-list (append Info-default-directory-list (list "c:/cygwin/usr/info/")))
@echo off
set home=C:\cygwin\home\jsulak\
C:\emacs-24.0.92\bin\runemacs.exe %*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment