简体   繁体   English

如何从Emacs编译缓冲区获得快速状态?

[英]How to get a quick status from the Emacs compilation buffer?

By default, emacs 22.1.1 only shows the top of the compilation buffer when you first issue the compile command. 默认情况下,emacs 22.1.1仅在您首次发出编译命令时显示编译缓冲区的顶部。 I would like it to scroll to the bottom automatically when I use the compile command in order to save keystrokes. 我想在使用compile命令时自动滚动到底部以节省击键次数。 This way I can easily get a status of the current compilation by just looking at the compile buffer and seeing which files are currently being compiled instead of having to switch windows and scroll to the bottom of the buffer. 这样我只需查看编译缓冲区并查看当前正在编译的文件而不必切换窗口并滚动到缓冲区的底部,就可以轻松获取当前编译的状态。 Any ideas? 有任何想法吗?

I think the best option is to stop on the first error 我认为最好的选择是停止第一个错误

(setq compilation-scroll-output 'first-error)

With this configuration, Emacs scrolls compilation mode until the first error happens. 使用此配置,Emacs将滚动编译模式,直到发生第一个错误。 This allows you to use next-error and previous-error before compilation finishes. 这允许您在编译完成之前使用next-errorprevious-error

If there aren't any errors, it scrolls until the end and you can thus easily see that compilation was succesful. 如果没有任何错误,它会滚动直到结束,因此您可以很容易地看到编译是成功的。

From Info > emacs > Compilation: 来自Info> emacs>编译:

If you set the variable compilation-scroll-output to a non- nil value, then the compilation buffer always scrolls to follow output as it comes in. 如果您的变量设置compilation-scroll-output到非nil值,则编译缓冲区始终滚动跟随输出,因为它的用武之地。

(setq compilation-scroll-output t)

or 要么

M-x set-variable compilation-scroll-output t RET

Also, if you get used to using next-error and previous-error before your compilation finishes, you will start to see why the default behavior is desirable. 此外,如果您在编译完成之前习惯使用next-errorprevious-error ,那么您将开始了解为什么需要默认行为。

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

相关问题 如何在Emacs中编辑*编译*缓冲区 - How to edit the *compilation* buffer in Emacs 如何在Emacs中创建类似于* compilation *的缓冲区? - How to create buffer similar to *compilation* in Emacs? emacs编译结束后如何自动跳转到*编译*缓冲区? - How to automatically jump into the *compilation* buffer after the compilation ending in emacs? 如何让emacs在每个缓冲区的基础上更改编译命令? - How do I get emacs to change the compilation command on a per-buffer basis? 如何在Emacs 23中的底部而不是右侧获取编译缓冲区? - How can I get the compilation buffer on the bottom rather than on the right in Emacs 23? 在emacs中使用两个帧时,如何防止编译缓冲区同时出现? - When using two frames in emacs, how do I prevent the compilation buffer from showing up in both? 如何调整Emacs的compile-goto-error从编译缓冲区获取的路径? - How to adjust the path that Emacs' compile-goto-error gets from the compilation buffer? 如何鼓励emacs遵循编译缓冲区 - How do I encourage emacs to follow the compilation buffer 如何在 Emacs shell 缓冲区中获得对“✖”等的支持? - How to get support for '✖' and the like in the Emacs shell buffer? emacs lisp,如何获得缓冲区主要模式? - emacs lisp, how to get buffer major mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM