gpt4 book ai didi

emacs - 在最近的 Emacs 中在其他窗口中显示缓冲区

转载 作者:行者123 更新时间:2023-12-04 17:11:35 26 4
gpt4 key购买 nike

如何以编程方式在窗口中显示缓冲区 other than the current ,类似于 Emacs 的 grep next-error 的行为.我希望它在最新的 Emacs 24.1 中工作。请注意,此逻辑最近在 Emacs 主干中进行了修改并合并为单个函数 display-buffer具有相当复杂的调用语义。我发现很难弄清楚如何使用 display-buffer即使在阅读了几次帮助之后。为什么没有这样的包装函数,例如 display-buffer-other-window ?

最佳答案

display-buffer 的冗长文档字符串包括以下内容:

The ACTION argument to `display-buffer' can also have a non-nil and non-list value. This means to display the buffer in a window other than the selected one, even if it is already displayed in the selected window. If called interactively with a prefix argument, ACTION is t.



因此,要在当前窗口以外的窗口中显示指定的缓冲区,可以使用:

(display-buffer BUFFER-OR-NAME t)

关于emacs - 在最近的 Emacs 中在其他窗口中显示缓冲区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10514470/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com