all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Eide <eeide@cs.utah.edu>
Subject: Re: Persisting centered cursor with Scroll Lock key
Date: Sat, 08 May 2004 17:59:33 -0600 (MDT)	[thread overview]
Message-ID: <ywrr7tu79ne.fsf@bas.flux.utah.edu> (raw)
In-Reply-To: m3ekpuesil.fsf@wilson.rwth-aachen.de

"Torsten" == Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

	Torsten> I've installed scroll-in-place.el and added (require
	Torsten> 'scroll-in-place) to my .emacs.  This .emacs doesn't contain
	Torsten> any other scroll setting commands except for (setq scroll-step
	Torsten> 1) (as far as I can see), *and* the (require 'scroll-in-place)
	Torsten> is almost the last command in the file.  But there is no
	Torsten> effect nevertheless.  [...]
	Torsten> 
	Torsten> Any ideas?

My first thought is that `scroll-in-place' is working, but that it's not doing
what you expect it to do.

In your original post, you asked for a way to keep the cursor (a.k.a. point) in
the middle of the window, no matter how point is caused to move within the
buffer.  That's not quite what `scroll-in-place' does.

The `scroll-in-place' package tries to keep point at its current visual
position --- whatever that happens to be --- across scrolling commands, and
*only* across scrolling commands (i.e., keys like PageUp, PageDown, C-v, and
M-v).  This is different than staying in the *middle* for *any* command.  For
instance, with `scroll-in-place' loaded, commands like `next-line' and
`previous-line' (keys like C-n, down-arrow, C-p, and up-arrow) still cause the
visual position of point to move.

(As an aside, I'll point out that even for scrolling commands, the "in-place"
behavior is subject to certain boundary conditions, e.g., at the ends of a
buffer, on short lines, etc.)

Here's a test to see if the package is working at all.  Load a large file
(several windows-full) and go to the beginning, so that the cursor is on the
first line of the window.  Now hit PageDown (or C-v) a few times, then hit
PageUp (or M-v) the same number of times.  If the package is loaded and
working, then the cursor should be back at the beginning of the window.  If the
package isn't loaded or isn't working, then point should be somewhere near the
bottom of the window.

My second thought is that there might be some other error in your `.emacs'
file, so the command that loads `scroll-in-place' isn't being executed.  (You
said that the `scroll-in-place' stuff is near the end of your `.emacs'.  If
Emacs finds an error in your `.emacs' file, then it stop processing at that
point --- and so the stuff at the end might not be run.)

You can check to see if the package is loaded in a number of ways.  Perhaps the
most straightforward way is to ask for the documentation of function
`scroll-window': type `M-x describe-function RET scroll-window RET'.  If the
documentation mentions `scroll-in-place', then the package is loaded.  If it
doesn't, or if the function isn't defined at all, then the package is not
loaded.

Finally, it's certainly possible that the package isn't working in your Emacs
for some reason, but I would need more details to figure out why.  What version
of Emacs are you using?  Does it work if you run Emacs without your `.emacs'
file (run `emacs -q' and then load the package manually (e.g., via `M-x
load-library')?

Thanks, and good luck! ---

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX

  parent reply	other threads:[~2004-05-08 23:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-08 16:14 Persisting centered cursor with Scroll Lock key Torsten Bronger
2004-05-08 16:36 ` Kai Grossjohann
2004-05-08 17:30   ` Torsten Bronger
2004-05-08 18:14     ` upro
2004-05-08 18:33       ` Torsten Bronger
2004-05-08 18:43         ` upro
2004-05-08 19:32     ` Kai Grossjohann
2004-05-08 19:50       ` Torsten Bronger
2004-05-08 19:55         ` Kai Grossjohann
2004-05-08 20:07           ` Torsten Bronger
2004-05-09  0:03           ` Eric Eide
2004-05-10  0:55             ` Thien-Thi Nguyen
2004-05-08 23:59     ` Eric Eide [this message]
2004-05-09  6:56       ` Torsten Bronger
2004-05-10 14:40         ` Eric Eide
2004-05-10 16:17           ` Stefan Monnier
2004-05-10 21:06             ` Kai Grossjohann
2004-05-11  4:53               ` Stefan Monnier
2004-05-11  6:09                 ` Torsten Bronger
2004-05-11  7:06                 ` Kai Grossjohann
2004-05-11  7:47                   ` Torsten Bronger
2004-05-12  7:35                     ` Kai Grossjohann
2004-05-09  0:16   ` Eric Eide
2004-05-08 19:32 ` Johan Bockgård

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=ywrr7tu79ne.fsf@bas.flux.utah.edu \
    --to=eeide@cs.utah.edu \
    /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.