Is there a way to make longlines mode the default for just the *compilation* buffer?

  • Just commenting to note that longlines mode will be deprecated in favour of visual-line-mode in the upcoming Emacs 24.4 release. (visual-line-mode was added in version 23.1.) – legoscia Apr 12 '13 at 12:43
  • Dandy! Any word on plans to make visual-line-mode work properly? – Aaron Miller Apr 17 '13 at 18:53

There sure is; you add to the compilation-mode-hook, which is called any time you enter compilation mode, a function which sets longlines-mode. Add the following to your ~/.emacs, or some other such suitable place:

  (defun compilation-mode-longlines-hook ()
    "Set longlines-mode when entering compilation mode."
    (longlines-mode t))

  (add-hook 'compilation-mode-hook 'compilation-mode-longlines-hook)

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.