unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* change the background color of a single window
@ 2006-12-18 22:24 Dieter Wilhelm
  0 siblings, 0 replies; 5+ messages in thread
From: Dieter Wilhelm @ 2006-12-18 22:24 UTC (permalink / raw)


Hi

is it possible to change the background color of a single window?
-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: change the background color of a single window
       [not found] <mailman.2085.1166480958.2155.help-gnu-emacs@gnu.org>
@ 2006-12-19 11:41 ` Johan Bockgård
  2006-12-19 13:38   ` Dieter Wilhelm
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2006-12-19 11:41 UTC (permalink / raw)


Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:

> is it possible to change the background color of a single window?

No (if you mean the same thing by "window" as Emacs does). There are
no buffer/window local faces (yet[1]). Faces can be frame local
though.

[1] http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00137.html

-- 
Johan Bockgård

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: change the background color of a single window
  2006-12-19 11:41 ` change the background color of a single window Johan Bockgård
@ 2006-12-19 13:38   ` Dieter Wilhelm
  2006-12-19 14:08     ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Dieter Wilhelm @ 2006-12-19 13:38 UTC (permalink / raw)


bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
>
>> is it possible to change the background color of a single window?
>
> No (if you mean the same thing by "window" as Emacs does). There are

Yes, sometimes I'm precise 8-).

> no buffer/window local faces (yet[1]). Faces can be frame local
> though.

Sigh, thank you anyway, you spared me the hassle to look further.

> [1] http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00137.html

Thank you Johan for the pointer but it's just a minor gripe for me (I
wanted to show a helper window in the frame with another background to
distinguish the windows better while saving the mode line space); I'll
stay with the stock (CVS) Emacs.

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: change the background color of a single window
  2006-12-19 13:38   ` Dieter Wilhelm
@ 2006-12-19 14:08     ` Juanma Barranquero
  2006-12-19 14:27       ` Dieter Wilhelm
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2006-12-19 14:08 UTC (permalink / raw)
  Cc: help-gnu-emacs

On 12/19/06, Dieter Wilhelm <dieter@duenenhof-wilhelm.de> wrote:

> (I
> wanted to show a helper window in the frame with another background to
> distinguish the windows better while saving the mode line space);

With a little elisp programming you could try using overlays. You can
use one overlay over the whole buffer, and you could even limit the
overlay to only being visible in a particular window (so other windows
showing the same buffer would not display the overlay's effects).

 (let ((ov (make-overlay (point-min) (point-max) nil nil t)))
   (overlay-put ov 'window (get-buffer-window MY-BUFFER))
   (overlay-put ov 'face MY-BACKGROUND-FACE))

Be sure to have a \n at the end of the last line, and it should work
reasonably enough, I think.

                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: change the background color of a single window
  2006-12-19 14:08     ` Juanma Barranquero
@ 2006-12-19 14:27       ` Dieter Wilhelm
  0 siblings, 0 replies; 5+ messages in thread
From: Dieter Wilhelm @ 2006-12-19 14:27 UTC (permalink / raw)
  Cc: help-gnu-emacs

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On 12/19/06, Dieter Wilhelm <dieter@duenenhof-wilhelm.de> wrote:
>
>> (I
>> wanted to show a helper window in the frame with another background to
>> distinguish the windows better while saving the mode line space);
>
> With a little elisp programming you could try using overlays. You can
> use one overlay over the whole buffer, and you could even limit the
> overlay to only being visible in a particular window (so other windows
> showing the same buffer would not display the overlay's effects).
>
> (let ((ov (make-overlay (point-min) (point-max) nil nil t)))
>   (overlay-put ov 'window (get-buffer-window MY-BUFFER))
>   (overlay-put ov 'face MY-BACKGROUND-FACE))
>
> Be sure to have a \n at the end of the last line, and it should work
> reasonably enough, I think.
>

Good idea, this might be the way to proceed. I'll try it, thanks.

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-12-19 14:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2085.1166480958.2155.help-gnu-emacs@gnu.org>
2006-12-19 11:41 ` change the background color of a single window Johan Bockgård
2006-12-19 13:38   ` Dieter Wilhelm
2006-12-19 14:08     ` Juanma Barranquero
2006-12-19 14:27       ` Dieter Wilhelm
2006-12-18 22:24 Dieter Wilhelm

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).