从Emacs编译Latex时阻止tex shell打开

从Emacs编译Latex时阻止tex shell打开,emacs,latex,elisp,dot-emacs,Emacs,Latex,Elisp,Dot Emacs,从Emacs编译Latex时,如何防止打开*tex shell*缓冲区?它将窗口一分为二,我总是使用C-x 1来立即消除它 解决方案可能与 (setq special-display-buffer-names ("*tex-shell*")) 这使得新的缓冲区占用整个帧而不是一半(不是我想要的) 我尝试了以下方法,但对乳胶没有效果: (defadvice compilation-start (around inhidbit-display (command &optional

从Emacs编译Latex时,如何防止打开*tex shell*缓冲区?它将窗口一分为二,我总是使用C-x 1来立即消除它

解决方案可能与

(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文件
,因此您必须建议
tex文件
,或者(稍微深入源代码)
tex启动shell

,我使用以下定义:

(defun tex-without-changing-windows ()
  (interactive)
  (save-buffer)
  (save-window-excursion (tex-file)))

我将它绑定到
C-C-f
以替换
tex文件

我不这么认为。模式是“乳胶”。实际上,我只在OS X上遇到了这个问题。在Ubuntu上,模式是“LaTeX/P”,tex shell没有打开。
C-h m
说你处于什么主要模式?“LaTeX模式:编辑LaTeX输入文件的主要模式。”你能介绍一下如何将它绑定到
C-C-f
?一种方法是覆盖tex的主模式映射中的绑定(警告,未测试的代码):
(加载“tex模式”(定义键tex模式映射(kbd“C-C-f”)#“my-tex-file-replacement))后评估更多信息:,