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: Po Lu
Subject: Re: Allowing point to be outside the window?
Date: Mon, 07 Feb 2022 09:21:47 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> So we have at most 3 states, and could have a single tri-state
> variable.

Indeed.

> And I question the validity of the combination scroll-move-point = nil
> with keep-point-visible = t.  The problem with your implementation is
> that scroll-move-point = nil disables scrolling in redisplay_window,
> but scrolling there is used not necessarily as result of scrolling
> commands, but also when redisplay_window decides that the optimal
> method of updating a window is to scroll its previous contents.  Thus,
> disabling scrolling on that level will cause confusing results,
> because users will expect that to affect only scrolling commands: they
> are unaware that redisplay sometimes scrolls the window for other
> reasons.

Perhaps we could have redisplay bind `scroll-move-point' to a reasonable
value before calling the scrolling commands?

> For that, you must set the force_start flag.  If you don't set it,
> redisplay cannot know whether the value of w->start is just the result
> of the previous redisplay cycle or was set by some user command which
> wants to scroll the window.
>
> Perhaps you want to explore using w->optional_new_start instead?

Yes, it seems to be perfect for what I need.  Thanks.

> Maybe so should we, at least as an option.

Sure, an option would be nice.


reply via email to

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