help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color theme buffer Emacs 24


From: Johnny
Subject: Re: Color theme buffer Emacs 24
Date: Sat, 27 Oct 2012 15:31:45 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux)

I'll answer myself on this one, as it was embarrasingly simple once
finding the solution;

In emacs 24, don't use color-theme and color-theme-buffer-local. Use
load-theme and load-theme-buffer-local. load-theme is included by
default, and load-theme-buffer-local is found in [1] below, just use
(require 'load-theme-buffer-local) in init.el

Apologies for the noise! 

J

Johnny <address@hidden> writes:

> Dear List,
>
> I just installed imaxima and my (otherwise oh so great) color theme
> looks horrible with all these maths! So I wanted to customise only
> imaxima buffers to use a dedicated color theme, and others to use my
> preferred theme.
>
> So I learned about color-theme-buffer-local [1] and fiddled with this
> for a while, when suddenly it dawned on me that Emacs 24 uses deftheme
> [2] for customisation. By using the simple theme editing interface, it
> was easy enough to switch to this with deftheme, great! However, this
> changes /all/ buffers! Blasphemy! With color-theme-buffer-local however,
> I can not see the pretty theme I just generated, and saw an appeal to
> developers of old themes to convert to the new method, so doubted the
> sanity in going down this route if there are better options. It appears
> these packages are quite unaware of each other, however I got some
> facsinating color combinations dancing around the screen by switching
> themes randomly with either method...
>
> The idea is short and simple (well, at least short):
> 1) Enable a custom color theme per buffer [3]
> 2) Add a custom theme to the list of available themes [4]
>
> Preferrably in a "modern and flexible" [TM] way, but that's not too
> important after all. Any ideas on good reads to achieve this or, even
> better, examples? 
>
> Yours truly,
>
> Johnny
>
>
> Footnotes: 
> [1]  https://github.com/vic/color-theme-buffer-local
>
> [2]  http://batsov.com/articles/2012/02/19/color-theming-in-emacs-reloaded/
>
> [3]  With 'color-theme-buffer-local' this can be set in init.el using
>      ,----
>      |   (add-hook 'inferior-maxima-mode-hook
>      |            (lambda nil (color-theme-buffer-local 
> 'color-theme-robin-hood (current-buffer))))
>      |   )
>      `----
>
> [4]  The theme I like to use is very simple and consists of
>      ,----
>      | (setq initial-frame-alist
>      |       '(
>      |        (foreground-color . "green")
>      |        (background-color . "black")
>      |        (cursor-color . "red")
>      |        (mouse-color . "green")
>      |        )
>      |       )
>      `----

-- 
Johnny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]