After doing an some emacs packages updates, every time a new file is opened the buffer has whitespace mode turned on. I see red on all the whitespace at the start of lines. I've tried disabling whitespace-mode, but can't change this behavior from happening on every new buffer.

Is there someway to make sure whitespace-mode is disabled on new buffers?

  • 2
    Turn off global-whitspace-mode? Try a word search for that function in your packages or user configuration and perhaps you'll find that it has been enabled. – lawlist Mar 6 '16 at 15:25
  • that has no impact on it. global-whitespace-mode off still opens new buffers with whitespace mode on. There must be something overriding this setting – Drew Mar 7 '16 at 17:24
  • 1
    Consider typing M-x describe-mode and update your question by listing all of the minor-modes that are active in the buffer just after opening it. If whitespace-mode is enabled, there two usual methods: (global-whitespace-mode 1) or (whitespace-mode 1). If you don't have either one of those somewhere in your setup, then I'm out of ideas. I suppose there could be a derived-mode like text-mode or prog-mode, which has something like (whitespace-mode 1) attached to a derived major-mode hook -- but that is certainly less common. – lawlist Mar 7 '16 at 20:42
  • In the mode-line, there is usually a capital WS for global-whitespace-mode and a little ws for buffer-local whitespace-mode. – lawlist Mar 7 '16 at 20:47
  • you're right, when first opening a file whitespace is enabled! I'm looking through my init to see if something is enabling it – Drew Mar 8 '16 at 22:03

Prelude's own prelude-whitespace was causing the behavior. You can disable it using:

M-x customize-group RET prelude

Set Prelude Whitespace (prelude-whitespace) to off/nil (default is on).

According to the prelude docs you can also set this variable in your configuration:

(setq prelude-whitespace nil)
  • If this resolved your problem, could you please accept your own answer so we can mark it as done, please? – Dan Apr 8 '16 at 0:56
  • Seems to still happen. Deleting the emacs cache file fixes it temporarily... – Drew Apr 9 '16 at 11:54
  • I'll just accept this, it's still happening but much less than before – Drew Apr 14 '16 at 19:50

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.