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: Stefan Monnier
Subject: Re: how to control isearch for invisible text
Date: Mon, 14 Aug 2006 10:43:03 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>>> "David" == David Kastrup <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>>> This is pretty useless, since in your kind of application, it would
>>> be important to know window-point rather than point.  The
>>> documentation of window-point already states:
>> 
>> So it's called multiple times on the same buffer for each window
>> that displays the buffer.  And you pass the window as argument (so
>> you rename it to pre-redisplay-functions).  Big deal.  Next
>> "problem"?
>> 
>>> And that is precisely the same problem with reveal-mode: sit-for can
>>> be called inside of save-excursions, and the current window-point need
>>> not correspond with the point relevant at top-level.
>> 
>> What matters is what is displayed.  Which is why a
>> pre-redisplay-hoook is what is needed.

> But how would reveal-mode know what point position it should act on?
> For example, when outline-mode is active, and I type `)', should
> show-paren-mode open an overlay on `(', even if this causes
> recentering?  After all, `pos-visible-in-window-p' is consulted by
> show-paren-mode before redisplay.

Of course, a pre-redisplay-hook is not the only thing needed.
In some cases it's enough, in others it's more tricky.  But it's a damn good
starting point.


        Stefan




reply via email to

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