views:

184

answers:

1

Hi,

I have a little problem with compiling my project in emacs. The compilation buffer does not line-wrap and I have some very long compile and link commands which I would like to sanity check sometimes.

Does anyone know how to force line-wrap on the output added to the compilation buffer, ideally as it is added (a la auto-fill).

VBR, Mark.

+7  A: 

Try this:

(defun my-compilation-mode-hook ()
  (setq truncate-lines nil)
  (setq truncate-partial-width-windows nil))
(add-hook 'compilation-mode-hook 'my-compilation-mode-hook)))
scottfrazer
That works a treat. Thank you.
sototozo
That nearly works, but after the first compilation, all my other buffers have this auto-wrap. Do you know how to limit the auto-wrap to only the compilation buffer?
Gauthier