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: Thu, 09 Dec 2021 17:22:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Now, window-start is a marker, so theoretically we could use the same
> marker with the buffer position updated due to the insertion, in which
> case the stuff displayed in the window may stay unchanged.

I don't know, because I can't think of what other programs do in this
situation, as they generally don't have commands that insert text
outside the visible area.

Perhaps someone else can chime in at this point.

> But is this what users will expect?  And if this is not what users
> expect, i.e. if we will need to recompute window-start anew in that
> case, we cannot use the "recenter around point" fallback.  Likewise
> with bringing point into the view: will this be what users expect in
> the described situation?

I see what you mean now.  We could have a user option that says one of
the following:

  - If the text before the window start changes, use the current value
    of the window start marker.

  - If the text before the window start changes, bring point into view.

  - If the text before the window start changes, try to move window
    start so that point appears in the middle of the window.  If that is
    not possible, move window start to the location that will cause
    point to appear closest to the middle of the window.

BTW, how would you recommend to determine inside redisplay whether the
text before the start of the window has changed?

Thanks.


reply via email to

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