unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lute Kamstra <Lute.Kamstra@cwi.nl>
Subject: Suggestion for hl-line.el
Date: Wed, 07 May 2003 14:33:56 +0200	[thread overview]
Message-ID: <sgdr87b5423.fsf@occarina.pna.cwi.nl> (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]

             reply	other threads:[~2003-05-07 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 12:33 Lute Kamstra [this message]
2003-05-07 14:46 ` Suggestion for hl-line.el 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

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=sgdr87b5423.fsf@occarina.pna.cwi.nl \
    --to=lute.kamstra@cwi.nl \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).