Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping tex-shell from opening when compiling Latex from Emacs

How can I prevent the *tex-shell* buffer from opening when I compile Latex from Emacs? It splits the window in half, and I always just use C-x 1 to get rid of it immediately.

The solution is possibly related to

(setq special-display-buffer-names ("*tex-shell*"))

which makes the new buffer take up the whole frame instead of just half (not what I want).

I tried the following, but it has no effect for Latex:

(defadvice compilation-start
    (around inhidbit-display (command &optional mode name-function highlight-regexp))
    (flet (display-buffer) (fset 'display-buffer 'ignore) ad-do-it))
(ad-activate 'compilation-start)
(ad-deactivate 'compilation-start)
like image 348
zoo Avatar asked Mar 03 '12 23:03

zoo


1 Answers

Well, you really should be using AUCTeX since it's much better. Nevertheless if you type C-hk and then a key sequence Emacs will tell you what would be run. In this case, for C-cC-f, it's tex-file so you will have to advise tex-file, or maybe (digging down into the source a little bit) tex-start-shell.

like image 112
Ivan Andrus Avatar answered Oct 05 '22 09:10

Ivan Andrus