all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com>
Subject: Re: Coloring window parts without content
Date: 29 Nov 2006 23:19:26 -0800	[thread overview]
Message-ID: <1164871165.904214.171900@j72g2000cwa.googlegroups.com> (raw)
In-Reply-To: <mailman.1343.1164870209.2155.help-gnu-emacs@gnu.org>


Dieter Wilhelm wrote:
> "spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com> writes:
>
> > I'd like to color the headings in outline, so that the headings have a
> > distinct background color which spans horizontally across the visible
> > window.
>
> This reminds me a bit of hl-line-mode.

I took a look at hl-line-mode implementation and the solution is very
simple. It puts an overlay onto the whole line including the newline
character (note the 1+):

      (move-overlay hl-line-overlay
		    (line-beginning-position) (1+ (line-end-position))
		    (current-buffer)))))

I also tried it with text properties and it works the same way:

   (put-text-property (line-beginning-position) (+ 1
(line-end-position))
                     'face 'highlight)


I thought I finally found something which emacs couldn't do, but I was
wrong. Emacs cannot be beaten. :)


The only thing remaining is to hack outline mode somehow to propertize
headings this way. I think it's an improvement, so it should  be
included (with an option maybe) in the default outline.el.

  parent reply	other threads:[~2006-11-30  7:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 10:48 Coloring window parts without content spamfilteraccount
2006-11-30  7:03 ` Dieter Wilhelm
     [not found] ` <mailman.1343.1164870209.2155.help-gnu-emacs@gnu.org>
2006-11-30  7:19   ` spamfilteraccount [this message]
2006-11-30  8:01     ` Dieter Wilhelm
     [not found]     ` <mailman.1345.1164873691.2155.help-gnu-emacs@gnu.org>
2006-11-30  8:17       ` spamfilteraccount
2006-12-01  0:39         ` Dieter Wilhelm
     [not found]         ` <mailman.1380.1164933580.2155.help-gnu-emacs@gnu.org>
2006-12-01  7:16           ` spamfilteraccount
2006-12-01  7:56             ` Dieter Wilhelm
     [not found]             ` <mailman.1390.1164959790.2155.help-gnu-emacs@gnu.org>
2006-12-01  8:09               ` spamfilteraccount
2006-12-01  8:22                 ` spamfilteraccount
2006-12-01 20:17                 ` Dieter Wilhelm
2006-12-04  9:54             ` Hadron Quark
2006-12-04 13:06             ` spamfilteraccount

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=1164871165.904214.171900@j72g2000cwa.googlegroups.com \
    --to=spamfilteraccount@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.