[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make scroll-{up, down} move point to {start, end} of newly visible t
From: |
Eli Zaretskii |
Subject: |
Re: Make scroll-{up, down} move point to {start, end} of newly visible text |
Date: |
Thu, 24 Aug 2023 07:43:15 +0300 |
> From: Emanuel Berg <incal@dataswamp.org>
> Date: Tue, 22 Aug 2023 21:41:05 +0200
>
> Eli Zaretskii wrote:
>
> >> No, for example, by opening this very buffer, Emacs already
> >> knows its state, since it displays "All" in the mode bar (and
> >> I didn't scroll).
> >>
> >> So it is already there. Somewhere!
> >
> > Yes, but _after_ the display, not before.
>
> It is available before scrolling, like now it says 4%.
> The next time I execute a scroll function by hitting a key,
> that function could look at that data and use it to determine
> if scrolling should take place, and only then do it.
You once again lost the context. Your proposed solution required to
have this information _after_ the scroll command, to know where the
display will end up after performing the scrolling. For that purpose,
it is not very useful to know where you are _before_ scrolling.
> Just now I'm scrolling some more, and now it says "Bottom" in
> the mode bar instead. I am able to scroll more, but the
> function I describe would in this, changed situation see that
> it already is at the bottom and therefore not scroll.
These indications are updated after two things happen, one after the
other:
. the scroll command determines where to locate the window-start
position
. the following redisplay cycle actually scrolls the text to obey
what the scroll command determined, determines the window's end
position, and updates the mode-line indication like "Bottom"
Your proposed solution was to inject some logic _between_ those two,
and the position of the end of the window is not yet known at that
point.
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, (continued)
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/11
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/12
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/12
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/12
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/12
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/13
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/13
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/22
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/22
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/23
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text,
Eli Zaretskii <=
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/24
Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Spencer Baugh, 2023/08/16
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/16
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Spencer Baugh, 2023/08/16
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/16
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Spencer Baugh, 2023/08/16
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/17
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Spencer Baugh, 2023/08/17
- Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Eli Zaretskii, 2023/08/17
Re: Make scroll-{up, down} move point to {start, end} of newly visible text, Emanuel Berg, 2023/08/02