unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Scroll lock
@ 2005-06-21 22:26 Ralf Angeli
  2005-06-22  3:41 ` Richard M. Stallman
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Ralf Angeli @ 2005-06-21 22:26 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]

Hi everybody,

in a German newsgroup somebody asked if it would be possible to keep
the position of point fixed while doing vertical motion, i.e. to have
a behavior commonly referred to as scroll lock.  Such a behavior can
be useful when you are primarily reading (in contrast to editing) a
file and want to scroll by line or paragraph up and down without
having to move point to the window top or bottom respectively.

As I could not find anything doing this in Emacs I wrote some code you
can find in the file attached to this message.  In case people find
this useful I'd be happy to sign papers for it and have it integrated
into Emacs proper.  In that case, however, I'd implement some parts of
it differently.

First, I would not use the scroll lock key for toggling unless it can
be supported correctly.  Instead, a "normal" key binding can be used.

Second, instead of using the Lisp functions `scroll-lock-mwheel-scroll'
and `scroll-lock-scroll-bar-toolkit-scroll', preserving screen
position should be handled in the scroll functions in window.c.  A
non-nil value of `scroll-preserve-screen-position' could not only mean
to preserve position if point moved out of the window during scrolling
(like it is now), but in any case.  This behavior is actually what I
expected when setting the variable to t.  Its doc string unfortunately
isn't very verbose about when the position is preserved and when it is
not.

Anyway, in case the functionality is not found to be useful or such an
addition should not be integrated because of the feature freeze I can
put the file into the Lisp repository on my.gnus.org for people
interested in it.

-- 
Ralf

[-- Attachment #2: scroll-lock.el --]
[-- Type: application/emacs-lisp, Size: 5642 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-07-04 13:25 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 22:26 Scroll lock Ralf Angeli
2005-06-22  3:41 ` Richard M. Stallman
2005-06-22  7:56   ` Ralf Angeli
2005-06-22 12:38     ` Juri Linkov
2005-06-22 13:38       ` Ralf Angeli
2005-06-23  0:54         ` Richard M. Stallman
2005-06-23  8:17           ` Ralf Angeli
2005-06-24  5:36             ` Richard M. Stallman
2005-06-26 21:38               ` Ralf Angeli
2005-06-23  0:54     ` Richard M. Stallman
2005-06-23  3:57       ` Miles Bader
2005-06-23  7:45       ` Ralf Angeli
2005-06-24  5:35         ` Richard M. Stallman
2005-06-26 21:38           ` Ralf Angeli
2005-06-27  5:37             ` Richard M. Stallman
2005-06-29 11:23               ` Ralf Angeli
2005-06-30  1:44                 ` Richard M. Stallman
2005-06-30  8:54                   ` Ralf Angeli
2005-06-30  9:32                     ` Miles Bader
2005-07-04 10:01                   ` Juanma Barranquero
2005-07-04 11:45                     ` Ralf Angeli
2005-07-04 13:25                       ` Juanma Barranquero
2005-06-22 12:13 ` Robert J. Chassell
2005-06-22 13:23 ` Thien-Thi Nguyen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).