From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Suggestion for hl-line.el Date: Wed, 07 May 2003 14:33:56 +0200 Organization: CWI, Amsterdam Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052313299 29582 80.91.224.249 (7 May 2003 13:14:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 7 May 2003 13:14:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 07 15:14:58 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19DOjw-0007bI-00 for ; Wed, 07 May 2003 15:13:44 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19DOnv-0003f9-00 for ; Wed, 07 May 2003 15:17:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DOes-0003qe-01 for emacs-devel@quimby.gnus.org; Wed, 07 May 2003 09:08:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19DOVo-0002K7-00 for emacs-devel@gnu.org; Wed, 07 May 2003 08:59:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19DOQc-0000Sh-00 for emacs-devel@gnu.org; Wed, 07 May 2003 08:53:49 -0400 Original-Received: from hera.cwi.nl ([192.16.191.8]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DO7R-0003YQ-00 for emacs-devel@gnu.org; Wed, 07 May 2003 08:33:58 -0400 Original-Received: from occarina.pna.cwi.nl (occarina.pna.cwi.nl [192.16.184.200]) by hera.cwi.nl with ESMTP id OAA05250 for ; Wed, 7 May 2003 14:33:56 +0200 (MEST) Original-Received: (from lute@localhost) by occarina.pna.cwi.nl (8.12.8/8.12.5) id h47CXujZ015232; Wed, 7 May 2003 14:33:56 +0200 X-Authentication-Warning: occarina.pna.cwi.nl: lute set sender to Lute.Kamstra@cwi.nl using -f Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) Original-Lines: 43 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13741 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13741 Dear people, Currently, lisp/hl-line.el defines two minor modes, one local and one global variant (defined with easy-mmode-define-global-mode). The minor modes highlight the line around point for the selected window only. They use an overlay, a function on pre-command-hook, and a function on post-command-hook to do that. I understand that hl-line.el was originally implemented to satisfy a feature request of people who wanted to use it to locate the point easily. The commentary section of hl-line.el actually discourages this use and suggest to use it for things like the Gnus summary buffer. I agree with this. There is a problem with this suggested use, however. Suppose one has two buffers visible: one buffer in a non-selected window and some sort of summary of this buffer in the selected window. hl-line-mode can now be used to highlight the current line in the summary buffer. However if the window of the other buffer becomes selected, the line in the summary buffer is no longer highlighted. I would like it to stay highlighted. In order to accomplish this, a second pair of minor modes ("sticky" variants of the original pair) could be implemented. They should highlight the line the buffer's point is in, in all windows. This might cause the mode to highlight another line than the line the window's point is in, but this seems hard to remedy. Implementation of such modes should be more efficient because only a highlighting function on post-command-hook is needed. In, fact I already implemented such a pair of minor modes. Is it a good idea to add such a second pair of minor modes to hl-line.el? Regards, Lute. -- Lute Kamstra CWI department PNA4 Room M233 phone (+31) 20 592 4214 [Echelon material: beanpole AFSPC enigma]