【问题标题】:in emacs how to control which windows to show compile result?在 emacs 中如何控制显示编译结果的窗口?
【发布时间】:2012-04-21 05:49:25
【问题描述】:

我使用 emacs 进行 erlang 编程。根据http://emacswiki.org/emacs/CompileCommand,我已经配置了 c-c c 进行重新编译。 在emacs框架中,打开了6个窗口,前3个用于erlang源代码的读写。 在下面的窗口中,一个用于编译窗口。 但是当不同的窗口被激活并重新编译时,编译窗口会随机切换。如何在一个特定的窗口中修复它?

【问题讨论】:

  • 这与stackoverflow.com/questions/1002091/…中的问题非常相似
  • 我认为这更像是那个问题的反面——我们不想避免一个特定的窗口;我们希望避免所有个窗口,而不是一个特定的窗口。

标签: emacs erlang


【解决方案1】:

如果您从 Chf display-buffer RET 开始阅读(或在手册中的 M-: (info "(elisp) Choosing Window") RET),你会发现很多可以修改行为的方法。

它可能会有点复杂,但在你的重新编译函数中可能只需要这样的东西:

(let ((display-buffer-overriding-action
       '(display-buffer-reuse-window)))
  (compile))

当我想将东西保存在一个地方时,我总是使用专用窗口,因此您可能还会发现这很有用:

M-: (info "(elisp) Dedicated Windows") RET

我使用来自Pin Emacs buffers to windows (for cscope)toggle-window-dedicated 函数(另请参阅How do I make this Emacs frame keep its buffer and not get resized?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-07-05
    • 2012-06-25
    • 2016-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多