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

## [h-e-w] bash and tex-shell

 From: Ken Brown Subject: [h-e-w] bash and tex-shell Date: Sat, 18 May 2002 14:35:22 -0400

I'm having trouble running tex under emacs, with bash as my shell. 've just upgraded ntemacs to 21.2 and cygwin to 1.3.10, running under windows NT. I previously had ntemacs 19.x and cygwin B20, and tex worked fine. My .emacs is appended below. It contains the lines involving bash that are recommended in the ntemacs faq and the cygwin faq.
```
```
I have no trouble running bash as a shell under emacs, and I can also run tex from within that shell. But when I try to run tex by giving the c-c c-f or c-c c-b commands, I hear a lot of hard disk activity but tex doesn't run and I finally have to hit c-g. I am then able to see that a tex-shell buffer was created, but nothing is in it.
```
```
If I comment out the part of my .emacs that sets up bash as the shell, emacs runs tex without a problem in a regular windows command shell.
```
Any help would be appreciated.

Ken Brown
============================================================================================

(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(global-font-lock-mode t nil (font-lock))
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)

;; The following was copied from the cygwin faq

(setq exec-path (cons "C:/cygwin/bin" exec-path))
(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
'comint-strip-ctrl-m)

;; The following comes from the ntemacs faq

(defun my-shell-setup ()
"For Cygwin bash under Emacs 20"
(setq comint-scroll-show-maximum-output 'this)
;; (setq comint-process-echoes t) ;; reported that this is no longer needed
(setq comint-eol-on-send t)
(setq w32-quote-process-args ?\")

(setq shell-mode-hook 'my-shell-setup)

```