Possibly others might be able to help with this:

-----Original Message-----
From: Christopher Mark Balz 
Sent: Tuesday, January 16, 2001 9:59 AM
To: 'Paul Kinnucan'
Subject: RE: Switching shell pointer on the fly:


Thank you very much; the shell pointer switching code works great, esp. with
keybindings.  However, I am still getting the same errors previously when I
build in Emacs (errors from the DOS build script) that do not happen when
the same script is run from the cmd.exe (black screen) command line.  It
does seem that previously the JDE switched to the DOS shell automatically
when it saw javabuild.bat as the make target, so that explicitly switching
shells did not change anything for these errors.

Is there any way that running the shell from Emacs can be made identical to
running the shell from cmd.exe?

Errors:
find: /c: No such file or directory
find: =: No such file or directory

Responsible lines:
        for /f "tokens=3" %%i in ('find /c "=" %DEPLOYMENTPROPERTIES_FILE%')
do (
       
      for /f "tokens=3" %%j in ('find /c "=" %DEVELOPMENTPROPERTIES_FILE%')
do (

.emacs file attached.

Thanks, 
  Chris Balz.

-----Original Message-----
From: Paul Kinnucan [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 4:00 PM
To: Christopher Mark Balz; JDE Mailing List (E-mail)
Subject: Re: Switching shell pointer on the fly:


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


.emacs

Reply via email to