[Top][All Lists]

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

Re: Problems with non-zero scroll-margin

From: Ralf Angeli
Subject: Re: Problems with non-zero scroll-margin
Date: Tue, 05 Jul 2005 18:39:41 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* Kim F. Storm (2005-07-05) writes:

> I would be VERY surprised if M-0 M-r suddenly started to scroll the
> window.

What do you mean with "started"?  Emacs 21 already behaves like this
in case `scroll-margin' has a non-zero value.

The description of `scroll-margin' in the Elisp manual also mentions
this behavior, see (info "(elisp)Textual Scrolling").

> Since move-to-window-line moves _point_ in the current window _without_
> scrolling, I don't understand why it would ever consider scroll-margin.
> But of course, the strict interpretation of scroll-margin's doc string
> says that point may never occur in these margins.  I think that is too
> restrictive.

It can be too restrictive if, for example, one wants to calculate an
amount of screen lines with code like

(count-screen-lines (save-excursion (move-to-window-line 0) (point)) (point))

I don't know if the redisplay code is able to force point out of the
margin during its execution, though.


reply via email to

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