emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature request for extra configuration variable.


From: dalanicolai
Subject: Feature request for extra configuration variable.
Date: Tue, 3 May 2022 13:30:39 +0200

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'.

Now, as obviously, there is already some (visually) 'clean' way to jump to some line and make it the window start (namely what happens automatically, when the new line is off-screen before the jump), I would expect that it should be quite easy to 'apply' the 'same mechanism' when the 'new line' is already on screen (which does NOT apply currently).

Now, of course it could be that there already exists some 'scrolling' configuration variable that takes care of this, but I am unable to find it, and no one responded to my earlier question.

So finally, my request is, if such variable does not exist, would it be possible to add some variable so that Emacs uses the 'same mechanism' for jumping to a line that is already 'on-window' as it uses for jumping to lines that are 'off-window' before jumping?

Then I could keep the code of the package, nice, clear and simple.

Thank you!




reply via email to

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