fniessen / emacs-leuven-theme

This Emacs theme reduces eye strain with a light, high-contrast color scheme, syntax highlighting, and support for multiple modes. Enhance your coding experience! #emacs #theme #coding #orgmode
GNU General Public License v3.0
696 stars 59 forks source link

magit uses dark backgrounds for highlight lines #61

Closed lvh closed 5 years ago

lvh commented 5 years ago

Hi! I'm not sure how to debug this but I figure a screenshot or two would speak a 1000 words.

Screenshot from 2019-03-10 17-15-26 Screenshot from 2019-03-10 17-15-28

package-list-packages shows me as having:

  leuven-theme       20190308.1534 installed             Awesome Emacs color theme on white background

Other themes, like e.g. the spacemacs builtin themes, appear to theme this face to match the theme. I assumed leuven-theme would do as well because of the README, which mentions:

“I love leuven for it’s magit faces. E.g. the different sections of the magit status screen stand out much better with leuven than with any other theme I’ve tried. It’s a good looking theme but what makes it stand out is the attention the author has put into all of the different faces you find everywhere.” – UnwashedMeme

So presumably I'm not seeing the intended behavior :)

I hunted this down in magit and it appears it has a default for "light themes" and "dark themes" and somehow has decided that leuven is a dark theme?

fniessen commented 5 years ago

Dear @lvh , I'm not using magit -- I prefer the vc-dir interface which allows me to use the same key bindings.

If you do have a suggestion about what to change, let me know. I'll accept your PR.

lvh commented 5 years ago

Ugh, never mind: the issue was on my side. For some reason customize had value specifying all teams were dark, and just unsetting that fixed the issue. Sorry!

fniessen commented 5 years ago

Thanks for mentioning, and closing this!

inducer commented 4 years ago

FWIW, just had the same issue as @lvh, and, for me, the offending customize setting was

'(frame-background-mode (quote dark))

I figured I'd add that since it wasn't totally explicit in @lvh's comment. Otherwise, nothing to do here. Thanks for the theme!

cpbotha commented 4 years ago

Thanks for the tip @inducer !

According to the documentation, when frame-background-mode is set to nil, the default, Emacs will "examine the brightness for you". Does anyone have any ideas why this does not work for leuven, but it does work for other light themes?

Some minutes later: Of course when I went digging, I found an explicit 'dark setting in my customize file. Of course Leuven works just perfectly also with magit, and the default setting of frame-backgound-mode to nil (autodetect)!

This is a great tip regardless: If you run into this issue, ensure with C-h v frame-background-mode that that variable is set to nil.

@fniessen Thank you again for such a fantastic theme. For two of the Emacs killer apps, namely orgmode and magit, Leuven is top of the class.

fniessen commented 4 years ago

@inducer and @cpbotha, thanks for helping making this contribution still stand out! And thanks for the nice comments - you know, after having copy/pasted some much code from all over the place, learning that way, it was my duty to share it with all of you.

As I said, I'm not using magit, though I know I could like it, but, having still SVN repos, I prefer one common way for accessing them all.

If you have suggestions for improvements, please send them…

(You may be interested having a look at some other projects of mine - namely git-leuven and shell-leuven - where I also share code for improving the experience in the shell, and with Git. As always, WIP, but a lot of good things is already in there.)