Reputation: 1911
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)
Upvotes: 6
Views: 1291
Reputation: 5301
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
.
Upvotes: 2
Reputation: 329
I use the following defun:
(defun tex-without-changing-windows ()
(interactive)
(save-buffer)
(save-window-excursion (tex-file)))
I bind it to C-c C-f
to replace tex-file
.
Upvotes: 0