[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39121: 27.0.60; occur: Add bindings for next-error-no-select

From: Mattias Engdegård
Subject: bug#39121: 27.0.60; occur: Add bindings for next-error-no-select
Date: Fri, 23 Jul 2021 19:16:02 +0200

23 juli 2021 kl. 16.05 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> (defvar occur-highlight-regexp t
>  "Regexp matching part of visited source lines to highlight temporarily.
> Highlight entire line if t; don't highlight source lines if nil.")
> So I think your patch looks correct.

Well yes, but that variable itself isn't really useful -- it is really just 
something transplanted from compilation-mode in order to achieve the same 
highlighting effect in Occur, but Occur shouldn't need it at all. So my patch 
is a bit rubbish; we could do better.

Currently, Occur buffers use `occur-target` properties to direct each line to 
the start of the first match on that line. We could use the property to 
indicating the exact extents (intervals) of matches, instead. For example, a 
buffer containing


with the Occur search regexp "VI.I", currently results in a line in *Occur* 
having the property `occur-target` with a marker to the start of 'VIDI' as 
value. Instead, we could make the value be ((m1 . m2) (m3 . m4)) where m1..m4 
mark the beginning and end of 'VIDI' and 'VICI' respectively. Then 
occur-highlight-regexp could be done away entirely.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]