2011-05-08

porting the zenburn theme to emacs 24

Just a small note: I already mentioned the zenburn color theme a couple of times. I have now ported the full (big) set of customizations to the emacs-24 format – find it at github; so if you run emacs 24 (the development version) and enjoy zenburn like me, you can give it try. Suggestions, additions are welcome.

Note, there seems to be a limitation with the :inherit-attribute for themes – in practice it means that some aspects of the theme may not work if a package sets the face before the theme does. Therefore, best to load the theme early from your .emacs or init.el; or alternatively visit the theme file (zenburn-theme.el in this case) and evaluate the buffer.

18 comments:

Anonymous said...

Great news, cheers!

Jeff Kowalczyk said...

This is great to have an update to zenburn, thanks for providing it. Two questions:

1) how is it installed in init.el?

2) Would you consider putting zenburn-theme in its own git repository? I plan to make an el-get recipe for it, and this would make the automatic install cleaner.

Jeff Kowalczyk said...

Never Mind on 1), a simple load file and require was all that was needed.

Still interested in 2) though for packaging.

Ian said...

Since there's only one el file, just use type http with URL https://github.com/djcb/elisp/raw/master/themes/zenburn-theme.el

See el-get/recipes/color-theme-subdued.el as example

Kao said...

Hey, I've ported zenburn to the custom-theme engine a while ago too. I think it's the same thing you meant by "porting to emacs 24". You might want to take a look at it: https://bitbucket.org/kcfelix/zenburn-theme.el

It's on bitbucket, so it's mercurial instead of git. I was meaning to move it to my github. I'll let you know when I do that.

Also, if you leave the theme on your load path (or on custom-theme-directory), you can use M-x load-theme RET zenburn to load it. You can even customize it to always load this theme. It works perfectly for me.

djcb said...

@Kao: ah, cool. a quick look that my version has some more customization, but you have some unique ones as well -- such as the ones for javascript.

Care if I copy that to my version?

Kao said...

@djcb: not at all! please do copy. Something you might like to do in your version as well is to use only named color constants instead of literals. IMHO is something that makes it easier to add new styles later on.

Also, if you're interested, I can fork your version, "merge" mine into yours, and make a pull-request. That way we can keep in sync and benefit everyone interested in this theme :)

Justin Lilly said...

Similar to el-get, I'd be interested in an ELPA version. Gives you at least +20 in emacs24 points. ;)

http://marmalade-repo.org/ -- easy to get stuff in there.

Anonymous said...

You should submit it for inclusion in Emacs 24 proper.

djcb said...

@Anonymous: I will so, eventually. For the moment, I'm just step-by-step.

adben said...

This theme is so cool, should be part of emacs 24

Anonymous said...

How do I make the background color darker? It's so bright behind the bright text that it hurts my eyes.

djcb said...

Anonymous: changing zenburn-bg (line 26 in https://github.com/djcb/elisp/blob/master/themes/zenburn-theme.el) should do the trick.

Anonymous said...

I was changing some of the background colors, however the highlight for transient-mode doesn't seem to happen. I tried changing the "highlight" color value but I saw no difference. How do I change the color value of the highlighted regions background color?

Awesome theme!

djcb said...

@Anonymous: check the face by moving the cursor to the highlighted area. Then, do 'M-x describe-face' to check what face is in used there. After that, edit the corresponding entry in the theme.

Anonymous said...

djcb Thanks!

skybert said...

Cheers for theme - and for introducing Emacs24 themeing to me. What a great new feature and what a nice looking theme!

Anonymous said...

Thanks for this.

However do you (or anyone else) know how to make the theme frame-local, so that one daemon/emacsclient can have different themes depending on if one connects to it with emacsclient -c or -nw flag

The question was raised (with code example) in:
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/msg00237.html