all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: `search-invisible' and text property `invisible'
Date: Thu, 27 Jun 2013 13:53:52 -0700 (PDT)	[thread overview]
Message-ID: <d4b53329-c1ea-4b00-967b-d8c9f87c3737@default> (raw)

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







                 reply	other threads:[~2013-06-27 20:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=d4b53329-c1ea-4b00-967b-d8c9f87c3737@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.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.