5

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! ;^)

Drew
  • 75,699
  • 9
  • 109
  • 225
Scotsgeek
  • 61
  • 2
  • 6
    `C-h v compilation-scroll-output` – rpluim Feb 28 '19 at 17:05
  • Thanks. Was not aware of that option. – Scotsgeek Feb 28 '19 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 01 '19 at 02:34
  • @lawlist: Wasn't clear to me. Retitled and tagged. Feel free to edit to make clearer. Thx. – Drew Mar 01 '19 at 04:51
  • @rpluim: Please consider posting your comment as an answer. – Drew Mar 01 '19 at 04:51

1 Answers1

8

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.

rpluim
  • 4,605
  • 8
  • 22