[Top][All Lists]

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

Re: Setting color themes specific to a frame

From: Thorsten
Subject: Re: Setting color themes specific to a frame
Date: Mon, 20 Feb 2012 08:52:57 +0100
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux)

Adam <> writes:

> I am using emacs 24, and really enjoy the new color theme feature.  I
> have one little issue, though.  I am using one emacs daemon instance,
> and lots of instances.  Some using X11-Frames, some on plain terminals.
> Is there any method to get the color theme just enabled on X11-frames,
> but fall back to the default color theme on terminals - or, more
> general - is there a method to set a color theme only for one specific
> frame, without affecting the other frames?

I just had a similar problem, and solved it with some help from this

I use the same setup like you - one daemon an lots of instances on plain
terminals and X, and use the following code to have different colors on

| (defun tj-set-window-type-dependend-emacsclient-colors ()
|     "Sets emacsclient colors for X.
| Background-color is set to black and foreground-color to wheat for
| emacsclient on X"
|     (if (display-graphic-p)
|         (progn
|           (set-background-color "black")
|           (set-foreground-color "wheat"))))
| (add-hook 'server-visit-hook
|           'tj-set-window-type-dependend-emacsclient-colors)

Instead of setting background-colors you might be able to change the

This only works, when visiting a file when calling emacsclient, i.e.

| exec emacsclient -c "/path/to/file.el"

When using only the -c flag without a file argument, the *scratch*
buffer is visited, but the server-visit-hook is not called apparently. 


reply via email to

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