emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 05 Dec 2021 11:03:34 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sun, 05 Dec 2021 08:45:14 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Btw, one issue that I couldn't figure out from reading the patch is
> > how do you intend to distinguish between point going out of the
> > viewport by an explicit user command (which AFAIU is what we want to
> > support in this new mode), and point going out of the viewport for
> > some other reason, for example text insertion before point?
> > Specifically, the bother is this: if we just disable/bypass all the
> > places where Emacs brings point back into the window, we could find
> > point outside of the window without the user meaning that to happen,
> > and the disabled/bypassed code will then leave point invisible.
> 
> Hmm, how about not allowing point to _move_ out of the window, instead
> only allowing window start to move so that point becomes invisible?

That'd cover scrolling a window in a way that leaves point outside of
it.  But Emacs also sets the window-start position in other
situations.  Moreover, the display engine itself does that, see
redisplay_window.

So some logic and/or flags will be needed to distinguish between the
cases.

> For instance, we could enable the code that scrolls the window to follow
> point if PT != w->point (if that makes sense).

So any change in the numerical value of point will scroll the window
to bring point into the view?  That'd be fine if that's what users
expect.  But do they?  E.g., what happens if point is below the
window, and you paste (with the mouse) some text into the visible
portion of the window (which doesn't show point)?



reply via email to

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