How to set different color theme for different Emacs frames?

2

1

I prefer dark color themes for editing source codes while programming but I'd like to use a brighter background with black characters when writing text in org-mode. How can I set different color themes on different frames in Emacs? If I switch to another color theme, it changes across all frames.

I use GNU Emacs 23.1.1 on OS X 10.6.

viam0Zah

Posted 2010-03-20T15:06:18.543

Reputation: 1 909

Related: Different color themes per mode in Emacs

– sampablokuper – 2016-08-11T19:05:56.823

Answers

2

I came to the solution in Juba's blog. Package color-theme defines variable color-theme-is-global which decides if the given color theme should be installed on all frames or on only selected.

A possible use for this variable is dynamic binding. Here is a larger example to put in your ~/.emacs; it will make the Blue Sea color theme the default used for the first frame, and it will create two additional frames with different color themes.

setup:

(require 'color-theme)
;; set default color theme
(color-theme-blue-sea)
;; create some frames with different color themes
(let ((color-theme-is-global nil))
  (select-frame (make-frame))
  (color-theme-gnome2)
  (select-frame (make-frame))
  (color-theme-standard))

viam0Zah

Posted 2010-03-20T15:06:18.543

Reputation: 1 909