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"