Subject: Re: bug#32676: Feature request

From: Ernesto Alfonso <[email-masked]>
Date: Thu, 13 Sep 2018 08:02:48 -0700

Hi Eli,

I first tried using hl-line, and my patch did use hl-line as a reference.

The problem is that there are two independent* markers, point, and a marker
at the beginning of the current error line in the next error buffer, for
example compilation-current-error, where the fringe arrow is displayed.

In the same way that the user can move around the point in the next-error
buffer between calls to {next,previous}-error without affecting the
location of the fringe arrow, the user should also be able to move point
around without affecting highlighting of the current error message (for
example, to kill part of an error message in the compilation buffer), since
this is really a visual enhancement to the fringe arrow.

Basically, the difference is that hl-line uses post-command-hooks to track
the current line and put an overlay on it, whereas in this case
highlighting only changes whenever next-error-hook is invoked.

Below is an example of diverging point and compilation-current-error
markers:

*Markers can be independent until 'next-error is invoked, which moves point
to the next error, but they can diverge between calls to next-error.

Thanks,

Ernesto

On Thu, Sep 13, 2018 at 7:14 AM Robert Pluim <[email-masked]> wrote:

> Eli Zaretskii <[email-masked]> writes:
>
> > [Please don't cross-post to emacs-devel.]
> >
> >> From: Ernesto Alfonso <[email-masked]>
> >> Date: Thu, 13 Sep 2018 00:10:09 -0700
> >>
> >> I recently made feature request along with a patch and sent it to
> [email-masked] based on the
> >> contributor guidelends.
> >
> > Thank you for your contribution.
> >
> > I didn't yet have time to review your changes in detail, but one
> > question immediately popped up in my mind: why not use hl-line for
> > this?  I believe this was suggested in the stackexchange discussion,
> > but for some reason not followed up.
>
> Iʼve been using display-line-numbers + line-number-current-line face
> for this, but hl-line works even better.
>
> Robert
>