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

Fixing sRGB using home brew build on OS X, no need for workaround #103

Closed andyleejordan closed 10 years ago

andyleejordan commented 10 years ago

On OS X, Emacs is best installed through home brew, using the command brew install emacs --srgb --cocoa --use-git-head

This compiles a Cocoa build of Emacs with fixed sRGB color support, and additionally builds off the git tag emacs-24.3.

With sRGB enabled, disabling the workaround is required, (setq solarized-broken-srgb 'nil). Currently this package defaults to enabling the work-around on all Darwin systems, and does not check whether it was built with sRGB support or not (I'll be looking into how this could be remedied).

Doing this, I checked the colors I was getting versus the Schoonover's screenshots, and they're just about perfect.

Edit: don't pass --HEAD (or --emacs-24.3, contrary to some random blog post I read long ago) or you'll get the latest (like master) build of emacs, which breaks from time to time. Leave it be, use 24.3.

localredhead commented 10 years ago

I just did brew install emacs --srgb --cocoa --use-git-head and it seems to work without disabling the srgb workaround. Any reason why?

adamv commented 10 years ago

--emacs-24.3 isn't an option in the formula:

==> Options
--cocoa
    Build a Cocoa version of emacs
--japanese
    Patch for Japanese input methods
--keep-ctags
    Don't remove the ctags executable that emacs provides
--srgb
    Enable sRGB colors in the Cocoa version of emacs
--use-git-head
    Use Savannah (faster) git mirror for HEAD builds
--with-gnutls
    Build with gnutls support
--with-x
    Include X11 support
--HEAD
    install HEAD version
andyleejordan commented 10 years ago

@localredhead If I were to hazard a guess, it seems to work because the workaround colors are very close to Solarized (else it wouldn't be a very good workaround :), but disabling the workaround gets you Solarized colors on the dot.

@adamv --emacs-24.3 is the --HEAD argument, where HEAD can be any specified version (from the repository).

adamv commented 10 years ago

You must be using some custom emacs formula then, because the stock emacs formula definitely doesn't respond to --emacs-24.3 style tags.

andyleejordan commented 10 years ago

@adamv

I'm not sure why it's not working for you, it's definitely not a custom formula. It's just version to install (instead of HEAD).

jacknagel commented 10 years ago

--emacs-24.3 is the --HEAD argument, where HEAD can be any specified version (from the repository).

Passing an arbitrary version doesn't do anything, only --HEAD and --devel are supported. You may be confused because Homebrew doesn't error out when given unrecognized options.

andyleejordan commented 10 years ago

All right, updated. Regardless, don't use --HEAD if you want a stable build.

ghost commented 10 years ago

The stable formula now supports --srgb option. Same as @andschwa, I have to disable solarized-broken-srgb. The default should now be nil with the advice build emacs with the srgb fix. Having the theme be broken out of the box for a correctly behaving emacs seems backwards to me.

sellout commented 10 years ago

We now check ns-use-srgb-colorspace when possible to set solarized-broken-srgb.

andyleejordan commented 10 years ago

:+1:

ghost commented 10 years ago

:smile_cat: Awesomesauce.

Stable formula built with --srgb doesn't define ns-use-srgb-colorspace, but I'm about to try building from HEAD.

andyleejordan commented 10 years ago

@toolbear I noticed that too. Let me know how the HEAD build works out for you; it was really unstable for me (window resizing wasn't even working).

andyleejordan commented 10 years ago

Must have just been yesterday's build. Rebuilt today, working perfectly.

ghost commented 10 years ago

@andschwa rebuilt emacs from homebrew formula using --srgb --HEAD and colors are correct with and without disabling the workaround. Thank you, @sellout.

andyleejordan commented 10 years ago

@toolbear Likewise! It's beautiful. Thanks @sellout.