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

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Mon, 13 Jan 2020 20:52:02 UTC

Severity: wishlist

Merged with 39122

Found in version 27.0.60

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #42 received at 39121 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Tino Calancha <tino.calancha <at> gmail.com>, 39121 <at> debbugs.gnu.org,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: 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 <at> 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

 VENI VIDI VICI

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.





This bug report was last modified 3 years and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.