Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line wrapping within emacs *compilation* buffer

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.

like image 958
sototozo Avatar asked Aug 18 '09 09:08

sototozo


1 Answers

Try this:

(defun my-compilation-mode-hook ()
  (setq truncate-lines nil) ;; automatically becomes buffer local
  (set (make-local-variable 'truncate-partial-width-windows) nil))
(add-hook 'compilation-mode-hook 'my-compilation-mode-hook)
like image 87
scottfrazer Avatar answered Sep 23 '22 02:09

scottfrazer