unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Corey Foote <coreyfoote@hotmail.com>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>,
	Xah <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Changing background color of an emacs window
Date: Thu, 22 May 2008 20:59:06 -0400	[thread overview]
Message-ID: <BLU105-W922F9C8B71ECD7B5FFBBFDAC10@phx.gbl> (raw)
In-Reply-To: <4835E76A.2050400@gmail.com>


Hello Lennart,Thank you! I really appreciate this code that you have contributed.However, I do have a few questions. I'm a newbie when it comes to Emacs Lisp, but is your code missing the read-color function? When I invoke buffer-bg-set-color interactively I get a message in the mini-buffer saying, "Symbol's function definition is void: read-color." I'm running GNU Emacs 22.1.50.1.Also when I call the function by saying, for example, (buffer-bg-set-color "blue" "test-buffer") in the scratch buffer in invoke it with C-x C-e, it applies the color to the scratch buffer itself and not to the test-buffer buffer like I had wanted.- Corey> Date: Thu, 22 May 2008 23:36:42 +0200> From: lennart.borgman@gmail.com> To: xahlee@gmail.com> CC: help-gnu-emacs@gnu.org> Subject: Re: Changing background color of an emacs window> > Xah wrote:> > On May 22, 8:25 am, Corey Foote <coreyfo...@hotmail.com> wrote:> > «When an Emacs frame is split into several windows, is there a way to> > change the background color (and perhaps other visual properties) of> > one window without changing the others?»> > > > I'm not aware a mode or default way to do it. But what you can do is> > write a function that changes current window bg color, to the post-> > command-hook.> > > > (defun change-bg-color-on-split ()> >   (let ((cmd this-command))> >     (when (string-equal cmd "split-window-vertically")> >       (set-background-color "#ffe4c4"))))> > > > (add-hook 'post-command-hook 'change-bg-color-on-split)> > > Unfortunately that does not change the bg color of the whole Emacs > frame, not just the current Emacs window.> > There has been a little bit talk about implementing background colors > etc per buffer on Emacs devel, but so far no one has done anything to > implement it as far as I know.> > There is one workaround, I just added this to EmacsWiki> >   http://www.emacswiki.org/cgi-bin/wiki/BufferBackgroundColor> > 
_________________________________________________________________
Keep your kids safer online with Windows Live Family Safety.
http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008



  reply	other threads:[~2008-05-23  0:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.12015.1211469916.18990.help-gnu-emacs@gnu.org>
2008-05-22 16:12 ` Changing background color of an emacs window Xah
2008-05-22 21:36   ` Lennart Borgman (gmail)
2008-05-23  0:59     ` Corey Foote [this message]
2008-05-22 15:25 Corey Foote

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=BLU105-W922F9C8B71ECD7B5FFBBFDAC10@phx.gbl \
    --to=coreyfoote@hotmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=xahlee@gmail.com \
    /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).