[英]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-error
和previous-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-error
和previous-error
,那么您将开始了解为什么需要默认行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.