[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`search-invisible' and text property `invisible'
From: |
Drew Adams |
Subject: |
`search-invisible' and text property `invisible' |
Date: |
Thu, 27 Jun 2013 13:53:52 -0700 (PDT) |
Current behavior for `search-invisible' values:
t - Finds any invisible-text match, whether due to an overlay
property or a text property. You cannot *see* the text
found, but you can see where it is (i.e., situate it
relative to surrounding text that is visible).
open - Finds an invisible match only if due to an overlay.
Only overlay-induced invisible text can be opened, so that you
can see the matched text.
But there is no technical reason why `open' could not at least
do what `t' does: find invisible text no matter how it is made
invisible. IOW, it could *open* invisible text due to an overly
and just *find* (without opening) invisible text due to text
property `invisible'.
Would that be more useful? A priori, I think so. But perhaps
there are good arguments not to do it?
The fix is trivial, AFAICT. In `isearch-isearch', change this:
(or (eq search-invisible t)
(not (isearch-range-invisible
(match-beginning 0) (match-end 0))))
to this:
search-invisible
Easy to try, to see what you think.
[Yes, the typical use case for matching hidden text is what
`open' was designed for (outlines etc.). But why not let
`open' be at least as good as `t' at finding invisible text of
any kind?]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- `search-invisible' and text property `invisible',
Drew Adams <=