all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: upro <upro@gmx.net>
Subject: Re: scrolling
Date: Fri, 08 Aug 2003 09:34:16 +0200	[thread overview]
Message-ID: <87isp8iow7.fsf@lux99.home> (raw)
In-Reply-To: uRDYa.89481$3o3.6183875@bgtnsc05-news.ops.worldnet.att.net

schaecsn <schaecsn@taipeh.wonderland.de> writes:

> Hi,
>
> 1) Let's assume the cursor is somewhere in the middle of the
> screen. How can I scroll the screen by 1 line up or down?
>
> 2) If I'm at the bottom of the screen and I press cursor-down then the
> screen scrolls by several lines. Google told me to set scroll-step to
> 1.
>
> (setq scroll-step 1)
>
> That works several times but then the cursor is suddenly in the middle
> of the screen. I don't like that.
>
>
> Thanks for any help :)

Hi!

I had the ame problem and didn't like the scroll behavior. 

I found scroll-in-place.el, which I bound to shift-cursor keys. When I
use it the cursor stays in place and the bzuffer content moves.

You should be able to find the code here:
http://www.on.ics.keio.ac.jp/~yasu/linux/scroll-in-place.el or
somewhere else on google. If not I can mail it to you or post it on
gnu.emacs.sources


I added the following lines to my .emacs:

;; Scrolls one line at the time
(setq scroll-step 1)

;; Better scrolling...
(require 'scroll-in-place)
;; By default, this package provides for the standard GNU Emacs vertical
;; scrolling commands (`scroll-down', `scroll-up', `scroll-other-window-
;; down', and `scroll-other-window') to use the "in place" features.  If you
;; would rather not have this, set the variable `scroll-in-place' to `nil':

(setq scroll-in-place nil)

;; When `scroll-in-place' is `nil' you will have to bind keys in order to
;; call the "in place" scrolling commands.  For example, you might want to do
;; the following:

(setq scroll-command-groups
      (list '(scroll-down-one-line scroll-up-one-line)))

;;; You could write the `scroll-down-one-line' command like this:

(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)))

;; key bindings
(global-set-key  [(shift up)] 'scroll-down-one-line)
(global-set-key [(shift down)] 'scroll-up-one-line)


HTH, best

-- 
Michael

r-znvy: zvpunry.wryqra  jro.qr (chg gur "@" jurer vg svgf...)
ab fcnz cyrnfr

  parent reply	other threads:[~2003-08-08  7:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-08  2:24 scrolling schaecsn
2003-08-08  4:55 ` scrolling Peter Lee
2003-08-08  7:01   ` scrolling schaecsn
2003-08-08  8:32     ` scrolling Ehud Karni
2003-08-08  7:34 ` upro [this message]
2003-08-08 17:15 ` scrolling Harshdeep S Jawanda
2003-08-08 18:57 ` scrolling Kai Großjohann
2003-08-08 23:01   ` scrolling schaecsn
2003-08-09  0:07     ` scrolling Johan Bockgård
2003-08-09 10:02     ` scrolling Kai Großjohann
2003-08-10 13:52       ` scrolling Peter Lee
2003-08-10 20:27         ` scrolling Kai Großjohann
2003-08-11  3:37           ` scrolling Peter Lee
2003-08-11 15:01             ` scrolling Stefan Monnier
2003-08-12 18:35             ` scrolling Kai Großjohann
2003-08-16 14:02 ` scrolling Alexander Nikolov
  -- strict thread matches above, loose matches on Subject: below --
2012-11-09 19:11 scrolling drain
2012-11-09 19:52 ` scrolling Doug Lewan
2011-04-01 13:19 scrolling Mario Lassnig
     [not found] <mailman.8812.1056799237.21513.help-gnu-emacs@gnu.org>
2003-06-29 10:46 ` Scrolling Kai Großjohann
2003-06-28 11:01 Scrolling K T Ligesh

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=87isp8iow7.fsf@lux99.home \
    --to=upro@gmx.net \
    /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.