all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: search-invisible and friends
Date: Thu, 10 Sep 2020 11:12:37 -0700 (PDT)	[thread overview]
Message-ID: <f7336a5c-be16-4274-82b0-560b86ce9886@default> (raw)
In-Reply-To: <871rj9957z.fsf@gnus.org>

> >> 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



  parent reply	other threads:[~2020-09-10 18:12 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 12:39 search-invisible and friends Lars Ingebrigtsen
2020-09-09 14:43 ` Eli Zaretskii
2020-09-10 12:38   ` Lars Ingebrigtsen
2020-09-10 14:29     ` Eli Zaretskii
2020-09-10 15:03       ` Stefan Monnier
2020-09-10 18:11         ` Juri Linkov
2020-09-10 20:47           ` Stefan Monnier
2020-09-10 22:10             ` Ihor Radchenko
2020-09-10 22:55               ` Stefan Monnier
2020-09-11  1:03                 ` Ihor Radchenko
2020-09-11  1:42                   ` Stefan Monnier
2020-09-11  5:35         ` Yuri Khan
2020-09-11 11:46           ` Lars Ingebrigtsen
2020-09-11 12:29             ` Eli Zaretskii
2020-09-11 14:40               ` Lars Ingebrigtsen
2020-09-11 14:50                 ` Eli Zaretskii
2020-09-11 14:56                   ` Lars Ingebrigtsen
2020-09-11 15:14                     ` Eli Zaretskii
2020-09-12 11:48                       ` Lars Ingebrigtsen
2020-09-12 15:29               ` Stefan Monnier
2020-09-11 11:41         ` Lars Ingebrigtsen
2020-09-10 18:12     ` Drew Adams [this message]
2020-09-09 15:10 ` Stefan Monnier
2020-09-09 15:26   ` Eli Zaretskii
2020-09-09 16:11     ` Stefan Monnier
2020-09-09 16:25       ` Eli Zaretskii
2020-09-10 12:35         ` Lars Ingebrigtsen
2020-09-10 12:42           ` Eli Zaretskii
2020-09-10 13:21             ` Stefan Monnier
2020-09-10 14:42               ` Eli Zaretskii
2020-09-11 11:37             ` Lars Ingebrigtsen
2020-09-11 12:25               ` Eli Zaretskii
2020-09-09 18:48 ` Juri Linkov
2020-09-10 12:01   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7336a5c-be16-4274-82b0-560b86ce9886@default \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.