sellout / emacs-color-theme-solarized

Emacs highlighting using Ethan Schoonover’s Solarized color scheme
http://ethanschoonover.com/solarized
MIT License
1.15k stars 201 forks source link

Dynamically generate appropriate ansi-term colors #77

Closed bradwright closed 11 years ago

bradwright commented 11 years ago

When an ansi-term buffer is launched, it gets the standard ANSI colours.

This can be overridden by explicitly setting ansi-term-color-vector when term is loaded. This replaces the standard 8 ANSI colours with the colours from the vector passed in.

I have two concerns with this commit:

  1. The code isn't great - really the fetching/naming of colours wants to be factored out instead of being generated in a giant flet/let construct. This way the vector could be generated outside the main construct;
  2. I'm not sure completely clobbering ansi-term-color-vector is the best thing to do, but it's what other themes do.
leea commented 11 years ago

Brad, I tried your commit and it didn't work for me. Emacs complains about the unspecified face in ansi-term-color-vector

Turns out you don't have to set ansi-term-color-vector, you can set term-color-* faces, which follows with the rest of solarized-definitions.el much better. I made the fix in my pull request https://github.com/sellout/emacs-color-theme-solarized/pull/78. It also includes solarized colors for shell-mode.

bradwright commented 11 years ago

@leea it worked fine for me, so I don't know what happened there. I'll give your branch a spin and if it works for me I'll close this.

bradwright commented 11 years ago

It doesn't work for me on ansi-term.

leea commented 11 years ago

Ahh. The problem seems to be that I'm using an snapshot build of emacs 24.3. The way colors are handled in term.el has changed.

See commit http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/term.el?h=emacs-24&id=b17778189e1df0a56e48a5f6f0b52f7bebbdfdd7

I will add a comment to my pull request.

On Tue, Jan 15, 2013 at 10:59 AM, Bradley Wright notifications@github.comwrote:

It doesn't work for me on ansi-term.

— Reply to this email directly or view it on GitHubhttps://github.com/sellout/emacs-color-theme-solarized/pull/77#issuecomment-12273957.

allen

bradwright commented 11 years ago

Closing in favour of #78 (since that works)