[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request for extra configuration variable.
From: |
Yuan Fu |
Subject: |
Re: Feature request for extra configuration variable. |
Date: |
Tue, 3 May 2022 16:12:32 -0700 |
> On May 3, 2022, at 4:30 AM, dalanicolai <dalanicolai@gmail.com> wrote:
>
> As I have already mentioned here before, I have written image-roll.el which
> provides an 'improved' document 'display engine', to give a better reading
> scrolling experience. The package already works quite fine for doc-view en
> pdf-tools. However, there is a remaining issue, for which I have asked some
> question already here.
>
> Now I could add extra logic to fix that issue, but I prefer to keep the code
> as straightforward, clear and simple as possible.
>
> The issue is due to the behavior, that if some line is already on screen,
> then, when jumping to that line will not make the line the 'window start'.
> When jumping to a line that is off-screen the problem does not occur, i.e.
> Emacs makes it the `window-start` automatically.
>
> The package is implemented so that each page is (on overlay over) a single
> line (i.e. a single space). The 'current page' should always be the page
> at/overlapping with the window start. So when jumping to a next page, the new
> page (i.e. line) should become the new window start.
> All pages that are 'calculated' to be not 'on-window' (in view) will get
> 'undisplayed' to save memory.
>
> So all pages above the 'new current page' get undisplayed, but when the 'new
> current page' is already within view (on-window), then when we jump to the
> new page, the page does not become the window start, and the undisplayed
> pages above it stay visible.
>
> When I try to use `(set-window-start ...)`, then for some reason subsequently
> setting `vscroll` does not work.
> Setting vscroll does work after a `(redisplay)` but then the jump becomes
> very 'ugly’.
Pardon me if I understood you, but have you tried setting NOFORCE argument to
t? Like so:
(set-window-start nil (point) t)
(set-window-vscroll nil scroll-amount t)
I have code like this running fine for one of my packages, maybe that can solve
your problem.
Yuan