I would like to have whitespace mode turned on for all buffer except for org-mode ones. It is easy to do this when emacs starts up, but since I use a persistant copy of emacs with emacs daemon mode I can't just do it that way.
I tried:
(require 'whitespace)
(setq whitespace-line-column 80)
(setq whitespace-style '(face lines-tail))
(global-whitespace-mode t)
(add-hook 'org-mode-hook
(lambda ()
(visual-line-mode 1)
(auto-fill-mode -1)
(setq whitespace-style nil)))
but as soon as I visit an org-mode buffer all of my future buffers don't have whitespace mode any more.
I thought of adding a hook to turn whitespace mode on for other major-modes but that seems like a bad way to go since I don't want to enumerate all the other possible modes.
I know that there is whitespace-mode along with global-whitespace-mode, but I'm not sure how I can use that to help here either.
Is there some other way to accomplish this that I'm not thinking of?