I'm attempting to have emacs compilation-mode always use visual-line-mode. The code I'm using is:
(add-hook 'compilation-mode-hook (visual-line-mode))
I've tried various other permutations. Such as the version in:
Or globally enabling visual-line-mode
(setq-default global-visual-line-mode t)
Yet emacs insists on truncating lines. I've confirmed the hook is executing. Is there a known resolution for this?
The primary issue is a Lisp newbie problem: The function
visual-line-mode was not quoted. This results in an immediate evaluation and not evaluation when the hook is fired.
This did not resolve the issue: compilation mode still does not wrap lines. I've confirmed the hook is being executed at the expected time by placing a undefined identifier instead of
t. Emacs complains, as expected, of the undefined identifier when compilation mode is entered.
Is there a way to trace execution of
(trace-function 'compile) produces:
====================================================================== 1 -> compile: command="make" comint=nil 1 <- compile: #<buffer *compilation*>
and nothing more.
As well as incorrect quoting, the issue was with another part of my emacs config:
(add-hook 'after-change-major-mode-hook (function (lambda () (fci-mode) (turn-on-auto-fill) ) ) )
which, effectively, undid the