I want globally enable whitespace-mode. I have tried this in my .emacs:
(require \'whitespace) (setq-default whitespace-style \'(face trailing lines empty indent
In general it's best to enable/disable modes by using the function call, not setting the variable (which is what you did for global-whitespace-mode).
global-whitespace-mode
Try:
(global-whitespace-mode 1)