Can't get colors to show up in the mode-line.
(eval-after-load "projectile" '(setq projectile-mode-line '(:eval (concat " Pj[" (propertize (projectile-project-name) 'foreground "#81a2be") "]"))))
The value gets evaluated correctly, because I see it change in the mode-line when I change pojectile projects, unfortunately it seems that string properties are stripped somewhere down the line. Any ideas how to fix this? Thx
EDIT projectile is unlikely to be at fault here cause I tried this with no effect:
(eval-after-load "lisp-mode" '(defadvice emacs-lisp-mode (after rename-modeline activate) (setq mode-name (propertize "El" 'foreground "#81a2be"))))
SOLUTION appears that I have been using the wrong property. Thanks to @politza this now works:
(eval-after-load "projectile" '(setq projectile-mode-line '(:eval (list " [Pj:" (propertize (projectile-project-name) 'face '(:foreground "#81a2be")) "]"))))
One caveat is that replacing
(list ...) with
(concat ...) to actually concatenate strings breaks things. If anyone knows why, I'd be glad to learn.