从Emacs编译Latex时,如何防止*tex shell*缓冲区打开?它将窗口一分为二,我总是使用C-X1来立即消除它。
该解决方案可能与有关
(setq special-display-buffer-names ("*tex-shell*"))
这使得新的缓冲区占据了整个帧,而不是仅仅占据了一半(这不是我想要的)。
我尝试了以下方法,但对乳胶没有效果:
(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)
好吧,你真的应该使用AUCTeX,因为它要好得多。然而,如果您键入C-hk,然后一个密钥序列Emacs将告诉您将运行什么。在这种情况下,对于C-CC-f,它是tex-file
,因此您必须建议tex-file
,或者可能(深入了解源代码)tex-start-shell
。
我使用以下defun:
(defun tex-without-changing-windows ()
(interactive)
(save-buffer)
(save-window-excursion (tex-file)))
我将其绑定到C-c C-f
以替换tex-file
。