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

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

How to scroll while keeping the position of the point with respect to th


From: Yevgeniy Makarov
Subject: How to scroll while keeping the position of the point with respect to the text?
Date: Wed, 05 Sep 2007 19:08:57 -0000
User-agent: G2/1.0

Hello,

I am looking for a way to scroll text vertically without moving the
position of point with respect to the text. I'd like to do this
frequently when I am prepared to edit something and would like to see
a bit more of the context without moving the point from the selected
position.

I know that this is what the recenter function does; however, it asks
for the screen line number where to put the point, and I would like
for this to be determined automatically by adding or subtracting 1
from the current line number.

If the point is on the top window line, it would be natural to do
(scroll-up 1) instead of recenter, and similarly for the bottom line.
In this case, of course, the position of the point with respect to the
text would change.

If there is no such standard command, I could one myself, but with
changing line height I found a little tricky to figure out whether the
point is on the bottom or top line in the window. Is there a
convenient way to do this?

Thank you,
Yevgeniy



reply via email to

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