At 05:09 PM 1/15/01 -0800, Christopher Mark Balz wrote:
>GNU Emacs 20.6.1 (i386-*-nt5.0.2195) of Tue Feb 29 2000
>Windows 2K
>Cygwin 
>
>On build, I must run a DOS script, although I prefer to use Cygwin's bash
>shell as my default shell.  
>
>Does anyone know how one would go about switching the shell pointer
>(selector) for the purpose of letting the build command work, and then
>switching back to the bash shell that I usually have set?  I don't know much
>Lisp but could get by with a little code starter if anyone had any.
>

Put these commands in your .emacs file.

(defun set-shell-bash()
  (interactive)
  ;; (setq binary-process-input t)
  (setq shell-file-name "bash")
  (setq shell-command-switch "-c")
  (setq explicit-shell-file-name "bash")
  (setenv "SHELL" explicit-shell-file-name)
  (setq explicit-sh-args '("-login" "-i"))
  (setq w32-quote-process-args ?\")
  (setq mswindows-quote-process-args t)
  )

(defun set-shell-cmdproxy()
  (interactive)
  (setq shell-file-name "cmdproxy")
  (setq explicit-shell-file-name "cmdproxy")
  (setenv "SHELL" explicit-shell-file-name)
  (setq explicit-sh-args nil)
  (setq w32-quote-process-args nil)
  )

Invoke set-shell-cmdproxy when you want to run a DOS script. Invoke
set-shell-bash to restore bash as the current shell.

- Paul


Reply via email to