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

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

Re: [h-e-w] Using multiple shells


From: Stephen Leake
Subject: Re: [h-e-w] Using multiple shells
Date: 16 Oct 2001 18:23:26 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

"Underwood, Jonathan" <address@hidden> writes:

> 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:
> 
> <snip>
> 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.

You need to check whether auctex uses shell-file-name to start the
latex process; most modes define their own variable for this, although
some hard-code it to "/bin/sh".

On the other hand, I recommend setting up a makefile to run LaTeX.
That way, you can keep track of all the files in the build at once,
and specify the --c-style-errors option to let Emacs parse the errors
nicely. This option is not available in all LaTeX distributions; it's
in MikTex but not Cygwin.

> 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.

If shell-file-name is the correct variable, you'll need to make it
buffer-local, so your C files will still work properly.

-- 
-- Stephe




reply via email to

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