all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Colin Williams <lackita@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Buffer-specific background color
Date: Mon, 21 Dec 2009 00:39:47 +0100	[thread overview]
Message-ID: <e01d8a50912201539r27ffbbfav2ed74c4701304635@mail.gmail.com> (raw)
In-Reply-To: <1b97198a0912201339g3953c506sc79464df530d566f@mail.gmail.com>

On Sun, Dec 20, 2009 at 10:39 PM, Colin Williams <lackita@gmail.com> wrote:
> I want to set the background color for a specific buffer, but I can't get it
> to work quite right.  I am able to alter the color of the background for the
> face default using (face-remap-add-relative 'default :background "#F9F9F9"),
> but if the text ends before the end of the buffer, so does the differing
> color.  By contrast, (set-face-attribute 'default (selected-frame)
> :background "#F9F9F9") will set the color for the whole buffer, but every
> other buffer in the frame as well.  Is there a way to set the entire
> background of just the current buffer?

Unfortunately there is no way to change the background color for a
buffer. I hope this will be added to Emacs soon.

In the meantime perhaps the simplest workaround is to use an overlay.
This has several disadvantages though:

- It overrides face backgrounds (since yet you can't have an overlay
with a priority lower than 0. I have asked for this to be changed in
Emacs too).
- It does not extend to the bottom of the window.

However this workaround is implemented in the function
buffer-bg-set-color in buffer-bg.el (part of nXhtml).




      reply	other threads:[~2009-12-20 23:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-20 21:39 Buffer-specific background color Colin Williams
2009-12-20 23:39 ` Lennart Borgman [this message]

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

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

  git send-email \
    --in-reply-to=e01d8a50912201539r27ffbbfav2ed74c4701304635@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lackita@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.