unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thorsten <quintfall@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Setting color themes specific to a frame
Date: Mon, 20 Feb 2012 08:52:57 +0100	[thread overview]
Message-ID: <87wr7iq6ue.fsf@googlemail.com> (raw)
In-Reply-To: 874numgl99.fsf@this.that

Adam <adam_w67@yahoo.com> 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




  reply	other threads:[~2012-02-20  7:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20  4:57 Setting color themes specific to a frame Adam
2012-02-20  7:52 ` Thorsten [this message]
2012-02-20  9:00   ` Adam
2012-02-20  8:23 ` suvayu ali
2012-02-20  8:52   ` Adam
2012-02-20 13:37     ` suvayu ali
2012-02-20 15:40       ` Drew Adams
2012-02-20 21:48 ` Maik Beckmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wr7iq6ue.fsf@googlemail.com \
    --to=quintfall@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).