all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Background color past the end of the buffer
Date: Fri, 10 Jul 2015 13:54:51 +0530	[thread overview]
Message-ID: <559F8153.6020805@gmail.com> (raw)
In-Reply-To: <mnmev9$sb9$1@ger.gmane.org>

On Friday 10 July 2015 12:06 AM, Yuri D'Elia wrote:
> I'd like to highlight the region past the end of the buffer; that is:
> assuming the buffer ends somewhere halfway the current frame (either due
> to scrolling or due to the buffer being short), I'd like to set an
> highlight between (point-max) and down to the modeline.
> 
> I assume it's not possible using markers, and thus overlays.
> 
> I don't want to display anything important right now, just change the
> background color.
> 
> Any other trick I could use?

Install these ... and then do M-x highlight-buffer-footer.

(defface buffer-footer
  '((t (:background "gold1")))
  "Face for buffer footer")

(defface buffer-text
  '((t (:background "white")))
  "Face for buffer text.")

(defun highlight-buffer-footer ()
  (interactive)
  (custom-set-variables
   '(buffer-face-mode-face (quote buffer-footer)))
  (buffer-face-mode 1)
  (overlay-put (make-overlay (point-min) (point-max)) 'face 'buffer-text))

Use of overlays (as seen above) may not be a good idea.  It would be
worth exploring if face remapping could be used (or improved upon) to
achieve the above effect.

----------------------------------------------------------------

If you are only intereseted in catching whitespaces at the tail end of
the buffer, you can turn on the `empty' style in M-x whitespace-mode
and M-x whitespace-toggle-options.



  reply	other threads:[~2015-07-10  8:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 18:36 Background color past the end of the buffer Yuri D'Elia
2015-07-10  8:24 ` Vaidheeswaran C [this message]
2015-07-12 18:54   ` Yuri D'Elia
2015-07-12 19:08     ` Achim Gratz
2015-07-12 19:37       ` Yuri D'Elia
2015-07-12 19:44         ` Yuri D'Elia
2015-07-12 19:56         ` Eli Zaretskii
2015-07-12 20:02           ` Yuri D'Elia
2015-07-13  2:33             ` Eli Zaretskii
2015-07-13  3:34               ` Vaidheeswaran C
2015-07-13 14:45                 ` Eli Zaretskii
2015-07-12 20:03         ` Achim Gratz
2015-07-12 20:07           ` Yuri D'Elia
2015-07-13  2:08     ` Vaidheeswaran C
2015-08-07 17:22       ` Yuri D'Elia

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=559F8153.6020805@gmail.com \
    --to=vaidheeswaran.chinnaraju@gmail.com \
    --cc=emacs-devel@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.
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.