From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Newsgroups: gmane.emacs.help Subject: Re: Setting color themes specific to a frame Date: Mon, 20 Feb 2012 08:52:57 +0100 Message-ID: <87wr7iq6ue.fsf@googlemail.com> References: <874numgl99.fsf@this.that> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1329724337 31738 80.91.229.3 (20 Feb 2012 07:52:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2012 07:52:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 20 08:52:16 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RzO2h-0005zN-UX for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Feb 2012 08:52:16 +0100 Original-Received: from localhost ([::1]:40438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzO2h-0003yZ-CC for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Feb 2012 02:52:15 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzO2W-0003yT-Qa for help-gnu-emacs@gnu.org; Mon, 20 Feb 2012 02:52:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzO2V-0005Go-DY for help-gnu-emacs@gnu.org; Mon, 20 Feb 2012 02:52:04 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:32857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzO2V-0005GR-7F for help-gnu-emacs@gnu.org; Mon, 20 Feb 2012 02:52:03 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RzO2P-0005pq-6U for help-gnu-emacs@gnu.org; Mon, 20 Feb 2012 08:51:57 +0100 Original-Received: from e178190157.adsl.alicedsl.de ([85.178.190.157]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Feb 2012 08:51:57 +0100 Original-Received: from quintfall by e178190157.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Feb 2012 08:51:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: e178190157.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:NwTAaiIg4NTX8A6LKd2ZOHTZrAM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83805 Archived-At: 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 newsgroup: 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 X: ,------------------------------------------------------------------- | (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 color-theme? 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. cheers -- Thorsten