help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Using multiple shells


From: Underwood, Jonathan
Subject: [h-e-w] Using multiple shells
Date: Wed, 10 Oct 2001 21:59:44 -0400

Hi

I'm wanting to use multiple shells in the following manner: for programming
(C etc) I want to be using cygwins bash, whereas for latex i want to be
using cmd.exe as the shell. I currently have cygwins bash set up as shell in
my .emacs in the following manner:

;; cygwins bash as shell 
(setq exec-path (append (list "c:/usr/cygwin/bin") exec-path))
(setenv "PATH" (concat "C:/usr/cygwin/bin;" (getenv "PATH")))
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name) 
(setq explicit-shell-file-name shell-file-name) 
(add-hook 'comint-output-filter-functions
          'comint-strip-ctrl-m)

This sets bash to be both my explicit shell, and the (inferior) shell
invoked with commands (eg. make). For latex i would like to have
shell-file-name set back to cmd.exe, so i tried doing the following:

(add-hook 'LaTeX-mode-hook
          '(lambda()
             (setq shell-file-name "cmd")
             (setenv "SHELL" shell-file-name) 
             (setq explicit-shell-file-name shell-file-name) ))

Now whilst this seems to invoke the correct shell (cmd.exe) the latex
compilation doesn't seem to start. I should also add that i'm running latex
via the auctex package.

I can;t help thinking there must be an easy way to set the shell-file-name
for each mode using hooks. Any help very greatly appreciated.

Thanks,

jonathan,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]