all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `search-invisible' and text property `invisible'
@ 2013-06-27 20:53 Drew Adams
  0 siblings, 0 replies; only message in thread
From: Drew Adams @ 2013-06-27 20:53 UTC (permalink / raw)
  To: emacs-devel

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







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-27 20:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 20:53 `search-invisible' and text property `invisible' Drew Adams

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.