[Top][All Lists]

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

Re: Allowing point to be outside the window?

From: Eli Zaretskii
Subject: Re: Allowing point to be outside the window?
Date: Mon, 29 Nov 2021 15:00:11 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 29 Nov 2021 09:47:39 +0800
> Eli Zaretskii <eliz@gnu.org> writes:
> Hmm, thanks.  Another question: is the only code that moves either point
> or window start in order to constrain point into the window in
> redisplay_window, under `recenter' and `try_to_scroll'?

A $64M question ;-)  Your opinion about my memory is too good.

But in general, I think you are looking at a too-narrow aspect of this
behavior.  First, even in xdisp.c there are several places where we
attempt to redisplay a window, and then reject the results because
point is not fully visible in the window.  "Reject" here sometimes
mean another, fresh attempt of redisplaying the window with some
conditions or variables modified to yield a success.  These places
should be audited in order to decide whether the rejection is
justified under this new feature.

Second, look at the scrolling code in window.c: under some conditions,
it decides up front that point will be invisible, and then either
moves point or modifies the scroll (i.e. the window-start).  That,
too, will have to be revisited and carefully audited.

And there could be other places as well, I simply don't remember.

So I think the answer to your question is, unfortunately, NO.  The
problem is wider and more complex than just the scrolling code in
redisplay_window in these two places.

reply via email to

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