all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Color theme buffer Emacs 24
@ 2012-10-22 23:59 Johnny
  2012-10-27 14:31 ` Johnny
  0 siblings, 1 reply; 2+ messages in thread
From: Johnny @ 2012-10-22 23:59 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Color theme buffer Emacs 24
  2012-10-22 23:59 Color theme buffer Emacs 24 Johnny
@ 2012-10-27 14:31 ` Johnny
  0 siblings, 0 replies; 2+ messages in thread
From: Johnny @ 2012-10-27 14:31 UTC (permalink / raw)
  To: help-gnu-emacs

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 <yggdrasil@gmx.co.uk> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-27 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 23:59 Color theme buffer Emacs 24 Johnny
2012-10-27 14:31 ` Johnny

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.