From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.help Subject: Re: Grid lines in background Date: Tue, 21 Jun 2011 17:37:13 +0000 (UTC) Message-ID: References: <4DFF40BD.3010200@gmx.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308679532 26754 80.91.229.12 (21 Jun 2011 18:05:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2011 18:05:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 21 20:05:28 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QZ5KI-000276-SS for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jun 2011 20:05:27 +0200 Original-Received: from localhost ([::1]:35075 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ5KH-0005re-Kl for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jun 2011 14:05:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ50i-0000qd-Cw for help-gnu-emacs@gnu.org; Tue, 21 Jun 2011 13:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZ50g-0007L3-KJ for help-gnu-emacs@gnu.org; Tue, 21 Jun 2011 13:45:12 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:35449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ50g-0007Ks-6x for help-gnu-emacs@gnu.org; Tue, 21 Jun 2011 13:45:10 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZ50e-0007ea-0w for help-gnu-emacs@gnu.org; Tue, 21 Jun 2011 19:45:08 +0200 Original-Received: from pool-72-95-250-103.pitbpa.east.verizon.net ([72.95.250.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jun 2011 19:45:08 +0200 Original-Received: from alp.tekin.aker by pool-72-95-250-103.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jun 2011 19:45:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 72.95.250.103 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_5) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81390 Archived-At: Drew Adams oracle.com> writes: > Dunno whether this helps, but you might want to take a look at Alp Aker's > code for column highlighting: > http://www.emacswiki.org/emacs/FillColumnIndicator Ironically, I just dropped support for the shading style of fill-column highlighting. The older code is still on the page, though, so the OP can take a look at it. If he wants to take a stab at adapting it, I'd recommend a two-part strategy: use font-lock to put shaded intervals on each line up to the end of the line, then put a zero-length overlay before the newline character with a before-string or an after-string that pads out the rest line of with however many more intervals are necessary to complete that line of the grid. (You wouldn't want to use overlays for everything, because that would quash any background coloration done by font-lock. If you use font-lock for the first part, you can arrange for the background shading to take lowest priority wrt to other fontification.) You'll have to add some epicycles to the arrangement if you want to avoid conflicts with whitespace-mode, hl-line-mode, et similia. Actually, now that I've thought about it should be pretty easy to implement, so I might do so when I next have a chance.