emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to control isearch for invisible text


From: David Kastrup
Subject: Re: how to control isearch for invisible text
Date: Sat, 12 Aug 2006 19:16:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:

>     > It seems like there should be some way to control whether
>     > isearch matches text that is invisible or ignores it.
>
>     > If there is no option..., then how about adding one?
>     > And adding an isearch keymap binding for toggling the
>     > option while searching.
>
>     > It would be a plus if the same option could act
>     > similarly for query-replace and occur. For query-replace,
>     > perhaps the same toggle binding could be used.
>
>     M-x apropos-documentation RET isearch.*invisible RET
>
> Thanks.
>
> So, now, how about:
>
> - documenting `isearch-invisible' in the Emacs manual?

It is `search-invisible'.  I consider it far too special to be
documented in the Emacs manual: this is a variable that should, if at
all, be used by the modes or packages making stuff invisible.

> - and the Elisp manual?

Not sure whether it is important enough for that.

> - creating a toggle for it?

Why?  It is not a user-level feature.  Providing a toggle would be the
task of any mode that makes stuff invisible and that would require to
have it accessible.

> - having `occur' and `query-replace' respect the option?

Sounds sort of reasonable, at least with query-replace.  With occur, I
am less sure, since it is sort of an internal grep.  But since occur
could not reasonably display something useful without making it
visible, it might be an idea.

> Also, I'm curious why the treatment of an `invisible' text-property
> value of `isearch-open-invisible' is limited to overlays. Why
> shouldn't the same behavior hold for the property if applied
> directly to text (that is, without an overlay)?

Because you can make some text visible without modification when there
is an invisible overlay over it.  If there are invisible text
properties, you can't remove them without changing the buffer, and
searching should not change the buffer.

Fiddling with invisibility-spec would affect all invisible regions,
not just the one at point.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]