GNU bug report logs - #69542
Feature request: making occur obey isearch-filter-predicate

Previous Next

Package: emacs;

Reported by: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>

Date: Mon, 4 Mar 2024 11:46:01 UTC

Severity: wishlist

Full log


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

From: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
To: Juri Linkov <juri <at> linkov.net>
Cc: 69542 <at> debbugs.gnu.org
Subject: Re: bug#69542: Feature request: making occur obey
 isearch-filter-predicate
Date: Sat, 9 Mar 2024 00:09:58 +0100
[Message part 1 (text/plain, inline)]
Il 05/03/24 18:11, Gabriele Nicolardi ha scritto:

>> I think duplicating the whole body of functions is not better
>> than using advice.
>
> Until yesterday, I had no idea how to advise a function.
>
> I don't know if advicing a function to advice a function inside it is 
> a good idea but it seem to work (I need more tests).
>
> Now I discovered how to build these functions I could be fine with my 
> modified ones, but making this feature avaible (maybe not default) in 
> the original functions could be a better idea
>
I found that advicing the |occur| and |how-many| function, overriding 
the |re-search-forward| function with my modified version of it 
(sensitive to |isearch-filter-predicate|) it’s not good at all.

That because some predicates, like e.g. |texmathp| provided by AUCTeX, 
use |re-search-forward| too.

> .
>
>>   An alternative would be to add a new variable
>> 're-search-forward-function' and then to use it like
>> '(funcall re-search-forward-function)'.
>
> The idea of a new function seems good to me.
>
>
​
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 103 days ago.

Previous Next


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