help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Scrolling in buffers with inline images / point outside viewport


From: David Engster
Subject: Re: Scrolling in buffers with inline images / point outside viewport
Date: Mon, 10 Jun 2013 17:53:52 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Eli Zaretskii writes:
>> From: David Engster <deng@randomsample.de>
>> Date: Sun, 09 Jun 2013 21:00:48 +0200
>> 
>> There's another problem with set-window-vscroll, which I did not mention
>> there: the further you go via vscroll, the slower it becomes until it's
>> pretty much unbearable. Don't even think of scrolling through large
>> buffers with this.
>
> I see no slowdown at all.

Well, it's been 5 years, maybe things have changed. I used to test it
this way: I opened my pretty long init file "~/.emacs" in a split frame
alongside the *scratch* buffer. In *scratch*, I evaluated this:

(with-selected-window (get-buffer-window ".emacs")
  (setq times-to-vscroll nil)
  (let (newval oldval)
    (setq oldval (float-time (current-time)))
    (dotimes (i 500)
      (setq newval (float-time (current-time)))
      (push (- newval oldval) times-to-vscroll)
      (setq oldval newval)
      (set-window-vscroll nil (+ (window-vscroll) 1))
      (redisplay t))))

I remember that this started quite fast with times well under a second
per scroll, but then grew up to 2 seconds or more at the end.

However, when I try this now, this code simply does not work; as soon as
the cursor leaves the viewport, it somehow resets back to the original
position. I have no idea what's going on.

-David




reply via email to

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