Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
Hrvoje Niksic <hniksic(a)srce.hr> writes:
> completely hosed? (`window-end' is extremely useful when you want
> to operate on the visible portion of the window, for whatever
> reason.)
Personally I think that is generally the wrong way to do this.
?
How can you know that? I need it for isearch, which is bound to one
window. Your needs (lazy-shot) are quite different, and harder to
meet. For me, window-start and window-end really do provide what I
want.
Lazy shot is a nice idea, but very hard to implement correctly.
> I don't know which of the two is more correct, but I
really think
> they should not differ.
I think the non-GUARANTEE values is wrong.
This may be so. However, it's exactly the value I need, and it seems
to be consistent with how the rest of XEmacs works, except for the
(1+ (point-max)) thing.
> * `window-start' doesn't have a GUARANTEE argument.
What use is it to
> be able to find window's end position without forcing a redraw
> without being able to do the same for its start position?
Because I think the window-start value is always GUARANTEEd.
You think wrong.
Try this: visit a largish file, and evaluate:
(progn
(goto-char (point-max))
(window-start))
It returns 1 for me. To make it right, I need this:
(progn
(goto-char (point-max))
(sit-for 0)
(window-start))
...but the forced redisplay slows things down and potentially makes
them uglier.