all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Suggestion for hl-line.el
@ 2003-05-07 12:33 Lute Kamstra
  2003-05-07 14:46 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Lute Kamstra @ 2003-05-07 12:33 UTC (permalink / raw)


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  <Lute.Kamstra@cwi.nl>
CWI  department PNA4
Room M233  phone (+31) 20 592 4214
[Echelon material: beanpole AFSPC enigma]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-16 10:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-07 12:33 Suggestion for hl-line.el Lute Kamstra
2003-05-07 14:46 ` Stefan Monnier
2003-05-08  7:00   ` Lute Kamstra
2003-05-08 14:48     ` Stefan Monnier
2003-05-09 11:59       ` Lute Kamstra
2003-05-15 13:32         ` Lute Kamstra
2003-05-15 15:50           ` Stefan Monnier
2003-05-16 10:07             ` Lute Kamstra

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.