1

I edit C in two windows side-by-side, source on left, compilation results on right. I have F5 bound to recompile.

Currently I have to do:

  • F5 to run make,

  • Move to *compilation* buffer in right window,

  • Scroll down to end of buffer,

  • Move back to left window to continue to edit.

I would prefer to have all the above happen automatically by pressing [F5], without leaving the left window, so I can see the results, and continue to work.

I write C, not Lisp! ;^)

  • 3
    C-h v compilation-scroll-output – rpluim Feb 28 at 17:05
  • Thanks. Was not aware of that option. – Scotsgeek Feb 28 at 19:26
  • @Drew -- I could be mistaken, but the recent edits providing for a top/bottom window split do not appear to reflect the intentions of the O.P., who apparently prefers a left/right window split and simply wants the output to be automatically scrolled without visiting the compilation window (and manually going to the end of the buffer). – lawlist Mar 1 at 2:34
  • @lawlist: Wasn't clear to me. Retitled and tagged. Feel free to edit to make clearer. Thx. – Drew Mar 1 at 4:51
  • @rpluim: Please consider posting your comment as an answer. – Drew Mar 1 at 4:51
3

This behaviour can be controlled by compilation-scroll-output.

compilation-scroll-output is a variable defined in `compile.el'.
Its value is `first-error'
Original value was nil

Documentation:
Non-nil to scroll the *compilation* buffer window as output appears.

Setting it causes the Compilation mode commands to put point at the
end of their output window so that the end of the output is always
visible rather than the beginning.

See Compilation for more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.