From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "spamfilteraccount@gmail.com" Newsgroups: gmane.emacs.help Subject: Re: Coloring window parts without content Date: 29 Nov 2006 23:19:26 -0800 Organization: http://groups.google.com Message-ID: <1164871165.904214.171900@j72g2000cwa.googlegroups.com> References: <1164797289.350661.184140@h54g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1164872453 14445 80.91.229.2 (30 Nov 2006 07:40:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Nov 2006 07:40:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 30 08:40:52 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GpgXI-0006Pm-GB for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Nov 2006 08:40:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpgXG-0003Kw-UT for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Nov 2006 02:40:47 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!j72g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 194.88.55.211 Original-X-Trace: posting.google.com 1164871171 26740 127.0.0.1 (30 Nov 2006 07:19:31 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 30 Nov 2006 07:19:31 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.00 (X11; Linux i686; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j72g2000cwa.googlegroups.com; posting-host=194.88.55.211; posting-account=b98TkQ0AAAD7PsllN8gfWGRoPOPWdnv4 Original-Xref: shelby.stanford.edu gnu.emacs.help:143517 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39119 Archived-At: Dieter Wilhelm wrote: > "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.