[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: search-invisible and friends
From: |
Drew Adams |
Subject: |
RE: search-invisible and friends |
Date: |
Thu, 10 Sep 2020 11:12:37 -0700 (PDT) |
> >> If not, I think it should, and perhaps (or perhaps not?) by
> >> piggy-backing on the search-invisible variable.
> >
> > How about extending search-invisible to support additional properties,
> > by providing some variable that would hold the list of such
> > properties? Then we could also avoid searching in text that is
> > visible, if some Lisp needs that (for example, you could have a form
> > where you'd like to search only the writable fields).
>
> Ah, yeah, that sounds quite useful and natural.
I too support the general idea. But I do hope that
the existing code interface for search-invisible
continues to work as is. IOW, can we add such a
feature without breaking existing code?
> We could even have a
> standard property like `no-search' that could be part of the default
> `search-invisible' value, so that modes can easily mark out regions that
> shouldn't be searched for. In which case, the whole `display' thing
> becomes moot -- in my mode, I could just slap the `no-search' property
> on all the image display bits that I want isearch to avoid?
It may not be just what you're asking for there, but
my code (libraries `zones.el' and `isearch-prop.el')
lets you easily toggle zones of text between visible
and visible (which affects search as expected).
It also lets you toggle visibility of the anti-zones,
i.e., the complement of a set of zones.
And you can limit isearch to being inside or outside
a set of zones. (This includes the simple case of
limiting search to the region - inside or outside it.)
And you can interactively define zones by the presence
of text properties (including with particular values).
And you can interactively put properties on the text
in a set of zones, or add properties to areas of text
that have other given properties and property values.
And you can narrow the zones to search to those with
lazy-highlighting. Which means you can search for one
thing, and then refine the search by searching for
something else within those search hits.
____
Zones description:
https://www.emacswiki.org/emacs/Zones
zones.el:
https://www.emacswiki.org/emacs/download/zones.el
Isearch Properties:
https://www.emacswiki.org/emacs/IsearchPlus
isearch-prop.el:
https://www.emacswiki.org/emacs/download/isearch-prop.el
- Re: search-invisible and friends, (continued)
- Re: search-invisible and friends, Yuri Khan, 2020/09/11
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/11
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/11
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/11
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/11
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/11
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/11
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/12
- Re: search-invisible and friends, Stefan Monnier, 2020/09/12
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/11
- RE: search-invisible and friends,
Drew Adams <=
Re: search-invisible and friends, Stefan Monnier, 2020/09/09
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/09
- Re: search-invisible and friends, Stefan Monnier, 2020/09/09
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/09
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/10
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/10
- Re: search-invisible and friends, Stefan Monnier, 2020/09/10
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/10
- Re: search-invisible and friends, Lars Ingebrigtsen, 2020/09/11
- Re: search-invisible and friends, Eli Zaretskii, 2020/09/11