From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eric Eide Newsgroups: gmane.emacs.help Subject: Re: Persisting centered cursor with Scroll Lock key Date: Sat, 08 May 2004 17:59:33 -0600 (MDT) Organization: University of Utah School of Computing Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <8765b63mfr.fsf@emptyhost.emptydomain.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084060948 17328 80.91.224.253 (9 May 2004 00:02:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 May 2004 00:02:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 09 02:02:19 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMblr-00089q-00 for ; Sun, 09 May 2004 02:02:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMblM-0000up-8v for geh-help-gnu-emacs@m.gmane.org; Sat, 08 May 2004 20:01:48 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!xmission!news.cc.utah.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 65 Original-NNTP-Posting-Host: bas.flux.utah.edu Original-X-Trace: coward.ks.cc.utah.edu 1084060780 2191 155.98.60.2 (8 May 2004 23:59:40 GMT) Original-X-Complaints-To: abuse@cc.utah.edu Original-NNTP-Posting-Date: 8 May 2004 23:59:40 GMT User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.1 (Cuyahoga Valley, berkeley-unix) Cancel-Lock: sha1:tCNuefbjlnxsV1nRGusBZX2WBBw= Original-Xref: shelby.stanford.edu gnu.emacs.help:123085 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:18372 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18372 "Torsten" == Torsten Bronger 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 . University of Utah School of Computing http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX