在另一个框架中重用*编译*窗口 [英] Reuse *compilation* window in another frame
问题描述
如何在 display-buffer-alist $中执行某些框架的
display-buffer-reuse-frames
c $ c>?
How is it possible to enforce display-buffer-reuse-frames
-like behavior for certain frames with display-buffer-alist
?
我尝试过
(setq display-buffer-alist
'(("\\*compilation\\*" .
(display-buffer-reuse-window '((inhibit-same-window . t))))
))
,但无济于事。即使是Emacs的标准,这些文档也是漫长而神秘的,没有任何的例子。
, but to no avail. The documentation is long and cryptic even by Emacs standards, and has no examples.
这与问题3311577 ,因为(setq -default display-buffer-reuse-frames t)
已被弃用。
推荐答案
想要在您的ALIST参数中使用 reusable-frames
条目到 display-buffer-reuse-window
,而不是栖息-同一窗口
? (或者也许你想要两个?)
It sounds like you want to be using the reusable-frames
entry in your ALIST argument to display-buffer-reuse-window
, rather than inhabit-same-window
? (or perhaps you wanted both?)
你也想使用 add-to-list
而不是clobbering整个列表与 setq
。
You also want to be using add-to-list
rather than clobbering the entire list with setq
.
编辑:我的原始答案搞砸了列表结构,因为我使用文档中的点对符号,但省略了一个点!
My original answer messed up the list structure, as I was using the dotted-pair notation from the documentation, but had omitted one of the dots!
所以正确的值是:
(add-to-list
'display-buffer-alist
'("\\*compilation\\*" . (display-buffer-reuse-window
. ((reusable-frames . t)))))
或等价:
(add-to-list
'display-buffer-alist
'("\\*compilation\\*" display-buffer-reuse-window
(reusable-frames . t)))
我也注意到有一个很好的自定义
配置此。
I also notice that there's a good customize
interface for configuring this.
这篇关于在另一个框架中重用*编译*窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!