Malabarba / smart-mode-line

A powerful and beautiful mode-line for Emacs.
898 stars 54 forks source link

smart-mode-line-powerline-theme with utf8 separator looks strange #155

Closed aiguofer closed 8 years ago

aiguofer commented 9 years ago

Thanks for helping me solve problem #154. The issue I'm having with the sml powerline-theme is that I would ike to use the utf8 separator since i tend to run emacs in terminal quite often, but when I have that set it looks a bit weird.

Additionally, the center section sometimes takes up too much space and squishes out my custom pyenv mode section (from https://github.com/cyberved/pyenv.el).

selection_056

aiguofer commented 9 years ago

Hmm... seeing this in *Messages*:

Error during redisplay: (eval (propertize " " (quote display) (funcall (intern (format "powerline-%s-%s" powerline-default-separator (cdr powerline-default-separator-dir))) (quote powerline-active1) nil))) signaled (error "Invalid face")
Malabarba commented 9 years ago

To make the center part smaller you can customize your sml/name-width variable. One option is to just set it to 0, and then set sml/shorten-directory to nil. This will make the path/name section as short as possible without hiding anything. To see other ways you can configure this variable, see its docstring.

As for the separators, I don't think I ever tried unicode separators, so it might just be that they're buggy. Sadly I won't have free time to dedicate to this for at least a couple of months. You can try customizing the mode-line-inactive face, and removing the Box property. If that doesn't help you can try other themes (I usually like the respectful theme). Or you can help me out and try to figure out why it's bugging out. :-)

FelipeLema commented 8 years ago

I'm also having the "Invalid face" error using the light powerline theme and Emacs 24.5.1

If you need more info, lmk

Malabarba commented 8 years ago

Could you do me a favor?

  1. Do M-x toggle-debug-on-error.
  2. Do M-: (force-mode-line-update).

Do you get a backtrace?

FelipeLema commented 8 years ago

Line update happens just after toggle-debug-on-error before I can force it:

Debugger entered--Lisp error: (error "Invalid face")
  internal-get-lisp-face-attribute(nil :inverse-video nil)
  face-attribute(nil :inverse-video nil default)
  pl/background-color(nil)
  powerline-utf-8-left(nil powerline-active1)
  funcall(powerline-utf-8-left nil powerline-active1)
  (propertize " " (quote display) (funcall (intern (format "powerline-%s-%s" (powerline-current-separator) (car powerline-default-separator-dir))) nil (quote powerline-active1)))
  eval((propertize " " (quote display) (funcall (intern (format "powerline-%s-%s" (powerline-current-separator) (car powerline-default-separator-dir))) nil (quote powerline-active1))))
  redisplay_internal\ \(C\ function\)() 

Also, this is not happening when using GUI/X, only on (remote) terminal

Malabarba commented 8 years ago

Thanks. I think I've managed to fix the errors now. No promises wrt to utf-8 separators looking weird. :-/