I've just installed powerline to update my emacs looks for the 21. century. I like it, but I'm bothered that the modified-buffer indicator is just a simple, barely discernible asterisk.

Is there a way to make the fact that the buffer is modified to be more eye-catching?

My config up to now is very simple:

(use-package powerline
  (setq powerline-display-buffer-size nil)
  (setq powerline-display-mule-info nil)
  (setq powerline-display-hud nil)
  (when (display-graphic-p)

Is there a simple way to change certain faces without creating custom poweline themes (I also don't like the color of the (which-function-mode) output.

Thank you very much!

  • Please provide a link to "Powerline". That can help others help you.
    – Drew
    Commented Dec 20, 2015 at 21:55

2 Answers 2

  • I use spaceline.

    Basically it's built on top of powerline and let you build your mode-line by adding several segments one after the other (in both left and right sections).

    For instance, the following segment: (major-mode :face highlight-face) will insert the current major mode and apply a special face to it. This face highlight-face changes following several criterias. You can customize spaceline-modified, spaceline-read-only and spaceline-unmodified faces to fix your issue.

  • If you still want to use powerline, you need to do what spaceline already does. That is to check for buffer status and apply the face you want. See buffer-read-only and buffer-modified-p.

Here is how my mode-line looks like:

Normal enter image description here Modified enter image description here Read-only enter image description here Helm enter image description here

  • It isn't clear to me how exactly to get spaceline to produce something like your screeshots. Could you share your config?
    – erikstokes
    Commented Jun 24, 2016 at 0:14
  • Sure, there you go. :-) Commented Jun 24, 2016 at 6:29

I had the same issue. Here is my spaceline configuration in totality to achieve the modified buffer objective:

  (require 'spaceline-config)
  (setq spaceline-highlight-face-func 'spaceline-highlight-face-modified)

Then customize the face, say, via M-x customize or:

 '(spaceline-modified ((t (:background "OrangeRed" :foreground "#3E3D31"
                                       :inherit (quote mode-line))))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.