I have a question about this, namely: how to make a line the 'window start'? Using 'set-window-start` does not work. From 'emacs -Q' (which starts within the scratch buffer), immediately evaluate (set-window-start nil (point)) to set the 'new' window start. Subsequently do (set-window-vscroll nil 1) it will scroll from the start of the buffer, and not from the 'new' window start as I would expect (of course, here there are no lines after the 'new' window start, but you could insert 1 to 3 on separate lines then set the line with 1 to window start, but this does not really change anything). On Tue, 26 Apr 2022 at 14:49, Po Lu wrote: > dalanicolai writes: > > > So I have created `image-roll.el` for displaying documents/books (see > > here). However, I have just noticed that it uses a large amount of > > RAM when viewing (or trying to) pages in the back of 'large' > > books. But even if RAM usage still looks perfectly fine, Emacs crashes > > when trying to scroll to higher page numbers. > > I didn't try to reproduce this problem, but note that it's slow to > vscroll large amounts of text. Instead, find the start of the first > line that will be visible onscreen (using window-text-pixel-size or > posn-at-point), make that the window start, and set vscroll starting > from there instead. >