# HG changeset patch # User Oleksandr Gavenko # Date 1268906541 -7200 # Node ID ee15316c1126cc0e9b6ce53bb4022c5d5450a7ce # Parent a6fb477c0e1913ba8b14835aeb281e8521c6f36d By default use sh as shell interpretator on Windows, thus Cygwin or MSYS required to properly work. Or set my-use-windows-shell to t. diff -r a6fb477c0e19 -r ee15316c1126 .emacs-my --- a/.emacs-my Thu Mar 18 11:56:02 2010 +0200 +++ b/.emacs-my Thu Mar 18 12:02:21 2010 +0200 @@ -566,12 +566,19 @@ ;; (setq shell-command-switch "-c") ;; (setenv "SHELL" shell-file-name) +(defvar my-use-windows-shell nil + "If t 'cmdproxy.exe' will be used as shell. Affect on M-x shell like + commands. If nil, 'sh' will be used." ) + (when (eq window-system 'w32) ; may require Cygwin or MSYS (setenv "ESHELL" "bash") - ;; Restore shell name if user set SHELL env var for Cygwin/MSYS. - (setq shell-file-name (concat exec-directory "cmdproxy.exe")) + (if my-use-windows-shell + ;; Restore shell name if user set SHELL env var for Cygwin/MSYS. + (setq shell-file-name (concat exec-directory "cmdproxy.exe")) + ;; Use shell from Cygwin/MinGW. + (setq shell-file-name "sh") + ) ;; (setq explicit-shell-file-name "bash") - ;; (setq shell-file-name "bash") (setq explicit-bash-args '("-i")) (setq explicit-sh-args '("-i")) ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"