[Top][All Lists]

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

prevent scroll-lock-mode from scrolling?

From: lee
Subject: prevent scroll-lock-mode from scrolling?
Date: Fri, 17 Jun 2016 03:12:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)


is there a way to prevent the point from moving up or down when
scroll-lock-mode is enabled and the contents of the buffer have been
scrolled so far as for the first or the last line to reach the top or
the bottom of the frame, respectively?

It pretty much defeats the idea of this mode when the point moves
nonetheless after scrolling for a bit, since I would use this mode to
keep the point in its very place when scrolling.

I do understand that the point moving might be a feature allowing the
point to reach every line of the buffer without having to disable
scroll-lock-mode.  However, my main purpose for the mode would be to
review some lengthy text, particularly source code, and I'd consider it
a useful feature to have to switch the mode on and off, mirroring
switching between reviewing and editing.

OTOH, I can even imagine modifying the mode such that when it's enabled,
the point always remains within a configurable number of lines at the
centre of the frame --- or at the centre of the lines, in case there can
be more lines displayed than the contents of the buffer have --- while
the contents of the buffer are being scrolled into position when I
scroll them.  There's probably such a "scroll-programming-mode" already

Thinking of this, is there a kinda complementary mode, or an option, to
scroll-lock-mode, which would move the point together with the contents
of the buffer when I scroll?  This would be useful to scroll in some
part of the buffer content which isn't currently visible without having
to leave the line the point is currently in.  (I'd use the ScrollLock
and Pause keys to toggle these two modes, and the "intermediate"
scrolling could automatically be disabled and the point be brought back
to where it was on the screen once I start typing again, like xterm does
this ...)

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit)
 of 2016-03-18 on heimdali

reply via email to

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