From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: upro Newsgroups: gmane.emacs.help Subject: Re: Persisting centered cursor with Scroll Lock key Date: Sat, 08 May 2004 20:14:36 +0200 Organization: Slackers Home Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87brkylrar.fsf@lux99.localhost> 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 1084040314 27098 80.91.224.253 (8 May 2004 18:18:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 18:18:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 08 20:18:29 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 1BMWP6-0005HM-00 for ; Sat, 08 May 2004 20:18:29 +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 1BMWOc-0000j6-UF for geh-help-gnu-emacs@m.gmane.org; Sat, 08 May 2004 14:17:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 Original-X-Complaints-To: http://news.individual.net/abuse.html Original-X-Trace: news.uni-berlin.de L5RdsPTDgQU/jwVbi03m6QEOe72tpd38947hTLg/hOvbm3VDB/ Os: Slackware 9.0.0/2.4.21 User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Yok3Olbw9yBF5XQLFGiDoZ9NoIg= Original-Xref: shelby.stanford.edu gnu.emacs.help:123076 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:18363 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18363 Torsten Bronger writes: > Halloechen! > > Kai Grossjohann writes: > >> Torsten Bronger writes: >> >>> I want to achieve the following: When Scroll Lock is active, >>> i.e. when the respective keyboard diode is on, the cursor is >>> always in the centre of the frame. >> >> There is scroll-in-place.el by Eric Eide (I think, could be >> another member of the Eric conspiracy) which allows you to keep >> the cursor where it is. Maybe that's close enough? > > I've installed scroll-in-place.el and added (require > 'scroll-in-place) to my .emacs. This .emacs doesn't contain any > other scroll setting commands except for (setq scroll-step 1) (as > far as I can see), *and* the (require 'scroll-in-place) is almost > the last command in the file. But there is no effect nevertheless. > > scroll-in-place is 1, which means that the fuctions are supposed to > be active. > > Any ideas? > > Tschoe, > Torsten. Yeah , I had the same whish and finalle achieved a similar but more sophisitaced behavior by the following, without using scroll-in-place: (defun scroll-down-one-line (arg) "Scroll down one line, or number of lines specified by prefix arg." (interactive "P") (let ((scroll-default-lines 1)) (scroll-down-in-place arg))) (defun scroll-up-one-line (arg) "Scroll down one line, or number of lines specified by prefix arg." (interactive "P") (let ((scroll-default-lines 1)) (scroll-up-in-place arg))) (global-set-key [(shift up)] 'scroll-down-one-line) (global-set-key [(shift down)] 'scroll-up-one-line) Now emacs scrolls as normal when using the arrow keys, but scrolls with fixed cursir, around the cursor when I use the arrow keys+shift. You can bind it to arrow keys only, of course... Nothing to do with your scroll-lock lamp or function or whatsoever, whatsoever... Does this help? -- Michael r-znvy: zvpunry.wryqra jro.qr (chg gur "@" jurer vg svgf...) ab fcnz cyrnfr