emacs-devel
[Top][All Lists]
Advanced

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

Re: Todays exercise of sanity (or does "see" really match "not"?)


From: David Kastrup
Subject: Re: Todays exercise of sanity (or does "see" really match "not"?)
Date: Mon, 21 Mar 2005 21:18:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

> "Lennart Borgman" <address@hidden> writes:
>> From: "Luc Teirlinck" <address@hidden>
>>> I guess that you have Info-hide-note-references enabled.  The reason
>>> why it stops on "see" is that the actual text in the buffer is:
>>> (*note Character Sets::). and note matches "not".
>>
>> Thanks. I am feeling better.
>
> The text "*note " has the `display' text property with the string
> "see " which is displayed instead of the original text.  The
> function `isearch-range-invisible' (which is used by Info search)
> doesn't pay attention to the `display' property.  It processes only
> the `invisible' property.  It works the same in all Emacs buffers
> with the `display' property (in `image-mode', `w3m' mode, etc.)
> where it finds the text not visible on the screen.
>
> How to handle this situation is not clear.  Should isearch find the
> displayed text as a contiguous part of the search space?
>
> The simplest solution is to treat the `display' property like
> `invisible' property and to skip the text displayed over the
> original text.

No, no, no.  preview-latex is one such application, and it is
essential that the text remains searchable (it will get autoopened if
point is inside of it).  It's overlays it uses instead of text
properties, but that does not change the underlying basics.  If we
want some text to be impervious to search, you can
a) make it a single character, and so point will never be inside
b) declare a special property that makes this character not match for
searches.

But that will also break things like ^.*$, so it would probably be
better to use some otherwise unused character and adorn it with proper
character class and syntax.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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