From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Corey Foote Newsgroups: gmane.emacs.help Subject: RE: Changing background color of an emacs window Date: Thu, 22 May 2008 20:59:06 -0400 Message-ID: References: <23f1d399-5bf7-41ea-b1e1-9b56450aa222@g16g2000pri.googlegroups.com> <4835E76A.2050400@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1211504376 22588 80.91.229.12 (23 May 2008 00:59:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 May 2008 00:59:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Lennart Borgman (gmail)" , Xah Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 23 03:00:12 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JzLdj-00060r-3V for geh-help-gnu-emacs@m.gmane.org; Fri, 23 May 2008 03:00:11 +0200 Original-Received: from localhost ([127.0.0.1]:40399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzLcy-0001ez-Py for geh-help-gnu-emacs@m.gmane.org; Thu, 22 May 2008 20:59:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzLck-0001eu-8Y for help-gnu-emacs@gnu.org; Thu, 22 May 2008 20:59:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzLch-0001e3-In for help-gnu-emacs@gnu.org; Thu, 22 May 2008 20:59:08 -0400 Original-Received: from [199.232.76.173] (port=39622 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzLch-0001dt-Eb for help-gnu-emacs@gnu.org; Thu, 22 May 2008 20:59:07 -0400 Original-Received: from blu0-omc1-s24.blu0.hotmail.com ([65.55.116.35]:27888) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JzLcg-0005IZ-Vv for help-gnu-emacs@gnu.org; Thu, 22 May 2008 20:59:07 -0400 Original-Received: from BLU105-W9 ([65.55.116.9]) by blu0-omc1-s24.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 22 May 2008 17:59:06 -0700 X-Originating-IP: [68.83.19.113] Importance: Normal In-Reply-To: <4835E76A.2050400@gmail.com> X-OriginalArrivalTime: 23 May 2008 00:59:06.0520 (UTC) FILETIME=[336D0180:01C8BC70] X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54255 Archived-At: Hello Lennart,Thank you! I really appreciate this code that you have contri= buted.However, I do have a few questions. I'm a newbie when it comes to Ema= cs Lisp, but is your code missing the read-color function? When I invoke bu= ffer-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 2= 2.1.50.1.Also when I call the function by saying, for example, (buffer-bg-s= et-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 +0= 200> From: lennart.borgman@gmail.com> To: xahlee@gmail.com> CC: help-gnu-em= acs@gnu.org> Subject: Re: Changing background color of an emacs window> > X= ah wrote:> > On May 22, 8:25 am, Corey Foote wrote= :> > =ABWhen an Emacs frame is split into several windows, is there a way t= o> > change the background color (and perhaps other visual properties) of> = > one window without changing the others?=BB> > > > I'm not aware a mode or= default way to do it. But what you can do is> > write a function that chan= ges current window bg color, to the post-> > command-hook.> > > > (defun ch= ange-bg-color-on-split ()> > (let ((cmd this-command))> > (when (stri= ng-equal cmd "split-window-vertically")> > (set-background-color "#ff= e4c4"))))> > > > (add-hook 'post-command-hook 'change-bg-color-on-split)> >= > Unfortunately that does not change the bg color of the whole Emacs > fra= me, not just the current Emacs window.> > There has been a little bit talk = about implementing background colors > etc per buffer on Emacs devel, but s= o 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.emacswik= i.org/cgi-bin/wiki/BufferBackgroundColor> >=20 _________________________________________________________________ Keep your kids safer online with Windows Live Family Safety. http://www.windowslive.com/family_safety/overview.html?ocid=3DTXT_TAGLM_WL_= Refresh_family_safety_052008=