开发者

How can I get the compile buffer place the point at its end?

开发者 https://www.devze.com 2023-04-13 01:31 出处:网络
When I compile (using Make, g++), the compile-buffer opens in a new window, and starts filling up with lines of compiler output. What I don\'t like is that when the number of lines exceeds the window

When I compile (using Make, g++), the compile-buffer opens in a new window, and starts filling up with lines of compiler output. What I don't like is that when the number of lines exceeds the window height, the window doesn't scroll to show the most recent messages at the bottom. Instead it just stays at the top of the buffer, adding the newest messages below the bottom of the window, out of view.

I work around this by switching to the compile window and moving the point to the end of the buffer using M-shift-'>'. Once the point is at the end, it stays there even when additional lines are added, so the bottom-most line stays visible in the window.

How can I automate this behavior, so that compiling not only opens up the compile buffer in a new wind开发者_开发知识库ow, but also moves (that window's) point to the end?


Look into the compilation-scroll-output variable. Instead of just scrolling to the end (setting it to t) I propose 'first-error that scrolls to the first error.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号