all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ralf Angeli <angeli@iwi.uni-sb.de>
Subject: Scroll lock
Date: Wed, 22 Jun 2005 00:26:39 +0200	[thread overview]
Message-ID: <d9a3rf$iiv$1@sea.gmane.org> (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

             reply	other threads:[~2005-06-21 22:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-21 22:26 Ralf Angeli [this message]
2005-06-22  3:41 ` Scroll lock 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='d9a3rf$iiv$1@sea.gmane.org' \
    --to=angeli@iwi.uni-sb.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.