xiaohanyu / oh-my-emacs

[Stopped] Provide an awesome, out-of-box, literate dotemacs for both newbies and nerds.
BSD 3-Clause "New" or "Revised" License
705 stars 141 forks source link

Q: Best method for color theme change? #58

Closed nehalecky closed 10 years ago

nehalecky commented 10 years ago

Hey @xiaohanyu! First, thank you: I've been able to spend a bit more time digging into the internals of OME and it is well-thought and well-implemented. Well-done :clap:

So, I am still modifying to my liking and wanted to ask, before hacking away: what would be the best approach to changing the default solarized color theme? I like solarized, however, am used to a few others (zenburn, snowish, etc.)

In my previous home-baked init.el, I was able to initialize any color-theme on load with:

;;==Color-Theme-Mode======================
(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/color-theme-6.6.0")
(require 'color-theme)
(eval-after-load "color-theme"
  '(progn
     (color-theme-initialize)
     (color-theme-snowish)))

In OME see the call to load solarized theme in ome-gui.org:

  (defun ome-color-theme-solarized-setup ()
    (load-theme 'solarized-dark t))

  (ome-install 'color-theme-solarized)

What is the best approach to expand / modify this for other themes?

Thanks much in advanced, appreciated: :)

xiaohanyu commented 10 years ago

Hi, I think there're two methods:

  1. If you do not want to change OME, you can just add your customization code to https://github.com/xiaohanyu/oh-my-emacs/blob/master/custom.el. By default, all code in this file will be loaded by OME. However, switching color-theme from A to B doesn't get same result with switching color-theme from vanilla emacs directly to B. This maybe a bug of emacs builtin color-theme.
  2. Second, you can just comment out the color-theme snippets in ome-gui.org and do anything you like.
nehalecky commented 10 years ago

Hey @xiaohanyu, thanks for the pointers.

I will look into implementing / configuring, however, in the meantime, maybe this issue could lead to more discussions as to providing a defined method to allow to select other color schemes in OME?

However, switching color-theme from A to B doesn't get same result with switching color-theme from vanilla emacs directly to B.

Understood, and as such, even providing some basic documentation outlining such steps, would be grand (e.g., Section like "Changing from Solarized to Color Theme A"). For all the builtin functionality OME has, this seems like it would be a nice fit. :)

As always, thank you.

xiaohanyu commented 10 years ago

Thanks for your advice. I'll take some time and implement this. It is useful.

rocknrollMarc commented 10 years ago

Yes it does take some time to figure out that this custom.el is actualy the treasure chest ;) Thank you so much for this emacs its actualy my first emacs and I am actualy a hardcore vim Tmux user ;) I use emacs now for clojure and scala development and vim for playframework stuff. The thing I dont like about emacs i the terminal integration its still not as nice as having zshell tmux and vim ... I love solarized and try to implement it were I can ... yes even eclipse has solarized and imessage LoL Ive done it with the apple pallet ;)

xiaohanyu commented 10 years ago

Fixed.