简体   繁体   English

如何在gud中关闭*输入/输出*缓冲区

[英]How to turn off *input/output* buffer in gud

I recently switched to using GNU Emacs 24 from 23, and I notice that whenever I enter gud the *input/output* buffer is open. 我最近切换到23使用GNU Emacs 24,我注意到每当我输入gud时,* input / output * buffer都是打开的。 I have close it manually with Cx 0 everytime I debug. 我每次调试时都用Cx 0手动关闭它。 Can anyone point me to the correct variable which needs to be configured in order to stop displaying this buffer by default? 任何人都可以指向我需要配置的正确变量,以便默认情况下停止显示此缓冲区吗?

There is a 'gud-gdb' in new emacs releases that implement the old behavior of gdb/emacs interaction (no dedicated-windows and no I/O buffer). 在新的emacs版本中有一个'gud-gdb',它实现了gdb / emacs交互的旧行为(没有专用窗口和没有I / O缓冲区)。 If you don't want to call Mx gud-gdb when you use it you can define an alias for Mx gdb 如果您在使用它时不想调用Mx gud-gdb,则可以为Mx gdb定义别名

I have this problem as well. 我也有这个问题。 After a quick look at the source code, the problem appears to be that GUD dedicates most of its windows (that is, it calls set-window-dedicated-p on them). 在快速查看源代码之后,问题似乎是GUD专用于大多数窗口(也就是说,它会调用set-window-dedicated-p )。 A dedicated window is one that cannot be switched away from. 专用窗口是无法切换的窗口。 I guess more and more young guns are using GUD in many windows mode and want GUD to manage their window layout, and those of us that like to do that manually are in the minority. 我想越来越多的年轻枪在许多Windows模式下使用GUD并希望GUD管理他们的窗口布局,我们这些喜欢手动操作的人是少数。 There doesn't seem to be anything obvious in gdb-mi.el that disables this behavior (for example, gdb-set-window-buffer seems to always do a set-window-dedicated-p to t for all windows it manages). 在gdb-mi.el中似乎没有任何明显禁用此行为的东西(例如, gdb-set-window-buffer似乎总是为它管理的所有窗口执行set-window-dedicated-p to t ) 。

For now, this solution is more or less the one I'm using -- I manually deactivate the window dedication. 目前, 这个解决方案或多或少是我正在使用的解决方案 - 我手动停用窗口专用。 This seems suboptimal, though. 但这似乎不是最理想的。 There ought to be some way to get GUD to let you manually manage the window layout. 应该有一些方法让GUD让你手动管理窗口布局。 This question is related. 这个问题是相关的。

You can disable window dedication altogether like this: (in Emacs 24.4+) 您可以像这样完全禁用窗口专用:(在Emacs 24.4+中)

(defun set-window-undedicated-p (window flag)
 "Never set window dedicated."
 flag)

(advice-add 'set-window-dedicated-p :override #'set-window-undedicated-p)

Note that this doesn't affect already dedicated windows. 请注意,这不会影响已经专用的窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM