From: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Coloring window parts without content
Date: Thu, 30 Nov 2006 09:01:04 +0100 [thread overview]
Message-ID: <87zma91hz3.fsf@hans.local.net> (raw)
In-Reply-To: <1164871165.904214.171900@j72g2000cwa.googlegroups.com> (spamfilteraccount@gmail.com's message of "29 Nov 2006 23\:19\:26 -0800")
"spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com> writes:
> 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. :)
>
Thank you for your response, I learned something as well 8-)
>
> 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.
Yes, it might improve readability (A graphic example comparing this
would be ideal to convince people working on this).
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
next prev parent reply other threads:[~2006-11-30 8:01 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
2006-11-30 8:01 ` Dieter Wilhelm [this message]
[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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zma91hz3.fsf@hans.local.net \
--to=dieter@duenenhof-wilhelm.de \
--cc=help-gnu-emacs@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.
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).