* scrolling
@ 2003-08-08 2:24 schaecsn
2003-08-08 4:55 ` scrolling Peter Lee
` (4 more replies)
0 siblings, 5 replies; 21+ messages in thread
From: schaecsn @ 2003-08-08 2:24 UTC (permalink / raw)
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 :)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 2:24 scrolling schaecsn
@ 2003-08-08 4:55 ` Peter Lee
2003-08-08 7:01 ` scrolling schaecsn
2003-08-08 7:34 ` scrolling upro
` (3 subsequent siblings)
4 siblings, 1 reply; 21+ messages in thread
From: Peter Lee @ 2003-08-08 4:55 UTC (permalink / raw)
>>>> schaecsn writes:
schaecsn> 1) Let's assume the cursor is somewhere in the
schaecsn> middle of the screen. How can I scroll the screen by 1
schaecsn> line up or down?
I use the following:
(defun pete-scroll-down-one ()
(interactive)
(scroll-down 1))
(defun pete-scroll-up-one ()
(interactive)
(scroll-up 1))
(global-set-key (kbd "<f12>") 'pete-scroll-down-one)
(global-set-key (kbd "<f11>") 'pete-scroll-up-one)
schaecsn> 2) If I'm at the bottom of the screen and I press
schaecsn> cursor-down then the screen scrolls by several
schaecsn> lines. Google told me to set scroll-step to 1.
schaecsn> (setq scroll-step 1)
schaecsn> That works several times but then the cursor is suddenly
schaecsn> in the middle of the screen. I don't like that.
This happens to me too... go to top of large buffer and just hit C-n.
Every once in a while the cursor pops to center of buffer and
continues down. Hopefully someone here can tell us how to fix that.
(require 'scroll-in-place)
(setq scroll-step 1)
(scroll-bar-mode -1)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 4:55 ` scrolling Peter Lee
@ 2003-08-08 7:01 ` schaecsn
2003-08-08 8:32 ` scrolling Ehud Karni
0 siblings, 1 reply; 21+ messages in thread
From: schaecsn @ 2003-08-08 7:01 UTC (permalink / raw)
Hey Great, it works ....
> (global-set-key (kbd "<f12>") 'pete-scroll-down-one)
> (global-set-key (kbd "<f11>") 'pete-scroll-up-one)
... at least in emacs-20.x and emacs-21.x but not in emacs-19.34.
Is there a way to refer in emacs-19.34 to the function keys?
- Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 7:01 ` scrolling schaecsn
@ 2003-08-08 8:32 ` Ehud Karni
0 siblings, 0 replies; 21+ messages in thread
From: Ehud Karni @ 2003-08-08 8:32 UTC (permalink / raw)
Cc: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 08 Aug 2003 07:01:47 GMT, schaecsn <schaecsn@taipeh.wonderland.de> wrote:
>
> > (global-set-key (kbd "<f12>") 'pete-scroll-down-one)
> > (global-set-key (kbd "<f11>") 'pete-scroll-up-one)
>
> ... at least in emacs-20.x and emacs-21.x but not in emacs-19.34.
>
> Is there a way to refer in emacs-19.34 to the function keys?
(define-key global-map '[f11] 'pete-scroll-up-one)
Ehud.
- --
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:ehud@unix.mvs.co.il Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)
iD8DBQE/M2AMLFvTvpjqOY0RArAzAJwLr0ZHpdJEIBsVrhNCgacY5GKcTQCeIKro
5eqA8ni1DVHR9RoCgspcxh0=
=qyQK
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 2:24 scrolling schaecsn
2003-08-08 4:55 ` scrolling Peter Lee
@ 2003-08-08 7:34 ` upro
2003-08-08 17:15 ` scrolling Harshdeep S Jawanda
` (2 subsequent siblings)
4 siblings, 0 replies; 21+ messages in thread
From: upro @ 2003-08-08 7:34 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 2:24 scrolling schaecsn
2003-08-08 4:55 ` scrolling Peter Lee
2003-08-08 7:34 ` scrolling upro
@ 2003-08-08 17:15 ` Harshdeep S Jawanda
2003-08-08 18:57 ` scrolling Kai Großjohann
2003-08-16 14:02 ` scrolling Alexander Nikolov
4 siblings, 0 replies; 21+ messages in thread
From: Harshdeep S Jawanda @ 2003-08-08 17:15 UTC (permalink / raw)
The following work for me:
* For scrolling down one line, I use C-down (the down arrow):
(global-set-key [C-down] '"\C-u1\C-v")
* For scrolling up one line, I user C-up (the up arrow):
(global-set-key [C-up] '"\C-u1\M-v")
schaecsn wrote:
>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 :)
>
--
Harshdeep S Jawanda
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 2:24 scrolling schaecsn
` (2 preceding siblings ...)
2003-08-08 17:15 ` scrolling Harshdeep S Jawanda
@ 2003-08-08 18:57 ` Kai Großjohann
2003-08-08 23:01 ` scrolling schaecsn
2003-08-16 14:02 ` scrolling Alexander Nikolov
4 siblings, 1 reply; 21+ messages in thread
From: Kai Großjohann @ 2003-08-08 18:57 UTC (permalink / raw)
schaecsn <schaecsn@taipeh.wonderland.de> writes:
> 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.
Emacs 21 has the variable scroll-conservatively. Use C-h v for more
information.
Does this help?
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 18:57 ` scrolling Kai Großjohann
@ 2003-08-08 23:01 ` schaecsn
2003-08-09 0:07 ` scrolling Johan Bockgård
2003-08-09 10:02 ` scrolling Kai Großjohann
0 siblings, 2 replies; 21+ messages in thread
From: schaecsn @ 2003-08-08 23:01 UTC (permalink / raw)
Hi
>> 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.
>
> Emacs 21 has the variable scroll-conservatively. Use C-h v for more
> information.
Finally, after 20 versions! :)
> Does this help?
Almost :) I set it to 1. Scrolling down in a large buffer works a
couple of times but then the cursor jumps in the middle of the screen.
- Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 23:01 ` scrolling schaecsn
@ 2003-08-09 0:07 ` Johan Bockgård
2003-08-09 10:02 ` scrolling Kai Großjohann
1 sibling, 0 replies; 21+ messages in thread
From: Johan Bockgård @ 2003-08-09 0:07 UTC (permalink / raw)
schaecsn <schaecsn@taipeh.wonderland.de> writes:
>> Emacs 21 has the variable scroll-conservatively. Use C-h v for more
>> information.
[...]
> I set it to 1. Scrolling down in a large buffer works a couple of
> times but then the cursor jumps in the middle of the screen.
Also read what C-h v scroll-step says.
--
Join us on #emacs @ irc.freenode.net.
http://www.emacswiki.org/cgi-bin/wiki.pl/EmacsChannel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 23:01 ` scrolling schaecsn
2003-08-09 0:07 ` scrolling Johan Bockgård
@ 2003-08-09 10:02 ` Kai Großjohann
2003-08-10 13:52 ` scrolling Peter Lee
1 sibling, 1 reply; 21+ messages in thread
From: Kai Großjohann @ 2003-08-09 10:02 UTC (permalink / raw)
schaecsn <schaecsn@taipeh.wonderland.de> writes:
> Almost :) I set it to 1. Scrolling down in a large buffer works a
> couple of times but then the cursor jumps in the middle of the screen.
Instead of 1, try a large number.
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-09 10:02 ` scrolling Kai Großjohann
@ 2003-08-10 13:52 ` Peter Lee
2003-08-10 20:27 ` scrolling Kai Großjohann
0 siblings, 1 reply; 21+ messages in thread
From: Peter Lee @ 2003-08-10 13:52 UTC (permalink / raw)
>>>> Kai Großjohann writes:
Kai> schaecsn <schaecsn@taipeh.wonderland.de> writes:
>> Almost :) I set it to 1. Scrolling down in a large buffer works
>> a couple of times but then the cursor jumps in the middle of
>> the screen.
Kai> Instead of 1, try a large number.
It doesn't appear to do what we want. When I repeatedly next-line I
would like the cursor to move down the buffer until it hits the bottom
and then the buffer would scroll up one line at a time.
What happens now is it works for a while, but will periodically jump
the cursor to the middle of the buffer.
Setting scroll-conservatively to 50 caused it to jump to the top of
the buffer while setting it to 4 caused it to jump 4 lines up from the
bottom. I was looking for a way to prevent it from jumping at all.
I don't think there's a way to do this currently, and I've learned to
live with it. If I'm scrolling down that much I usually use C-v
anyway.
Thanks for the info.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-10 13:52 ` scrolling Peter Lee
@ 2003-08-10 20:27 ` Kai Großjohann
2003-08-11 3:37 ` scrolling Peter Lee
0 siblings, 1 reply; 21+ messages in thread
From: Kai Großjohann @ 2003-08-10 20:27 UTC (permalink / raw)
Peter Lee <pete_lee@swbell.net> writes:
> Setting scroll-conservatively to 50 caused it to jump to the top of
> the buffer while setting it to 4 caused it to jump 4 lines up from the
> bottom. I was looking for a way to prevent it from jumping at all.
I wasn't thinking of 50 when I said large number :-)
FWIW, I have (setq scroll-conservatively 9999) and scrolling down
some part of my ~/.emacs file didn't cause it to jump, even though
Emacs was doing garbage collection after a few hundred lines.
What happens when you leave scroll-step at the default of 0 and set
scroll-conservatively as I suggested?
[time passes]
Okay, I did a test. I invoked Emacs 21.3 (not the version I'm using
to post this) via "emacs -q -no-site-file", then I typed the
following into the *scratch* buffer and hit C-j at the end of the
line:
(setq scroll-conservatively 9999)
Then I opened ~/.emacs and scrolled down 600 lines. I didn't observe
any jumping.
What happens when you do this? (Maybe use another file.)
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-10 20:27 ` scrolling Kai Großjohann
@ 2003-08-11 3:37 ` Peter Lee
2003-08-11 15:01 ` scrolling Stefan Monnier
2003-08-12 18:35 ` scrolling Kai Großjohann
0 siblings, 2 replies; 21+ messages in thread
From: Peter Lee @ 2003-08-11 3:37 UTC (permalink / raw)
>>>> Kai Großjohann writes:
Kai> I wasn't thinking of 50 when I said large number :-)
Kai> FWIW, I have (setq scroll-conservatively 9999) and scrolling
Kai> down some part of my ~/.emacs file didn't cause it to jump,
Kai> even though Emacs was doing garbage collection after a few
Kai> hundred lines.
Setting it to 9999 solves the problem. It's just not intuitive to me
why.
Setting that var to 0 sporadically re-centers the cursor... setting it
to 50 causes cursor to pop to top of buffer every time cursor hits
bottom, setting it to 9999 causes desired behavior (at least in my
view).
Oh well, at least it works. Thanks for the help.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-11 3:37 ` scrolling Peter Lee
@ 2003-08-11 15:01 ` Stefan Monnier
2003-08-12 18:35 ` scrolling Kai Großjohann
1 sibling, 0 replies; 21+ messages in thread
From: Stefan Monnier @ 2003-08-11 15:01 UTC (permalink / raw)
> Setting that var to 0 sporadically re-centers the cursor... setting it
It should not be "sporadically" but "always". Maybe you have set
scroll-step at the same time as scroll-conservatively.
Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-11 3:37 ` scrolling Peter Lee
2003-08-11 15:01 ` scrolling Stefan Monnier
@ 2003-08-12 18:35 ` Kai Großjohann
1 sibling, 0 replies; 21+ messages in thread
From: Kai Großjohann @ 2003-08-12 18:35 UTC (permalink / raw)
Peter Lee <pete_lee@swbell.net> writes:
> Setting it to 9999 solves the problem. It's just not intuitive to me
> why.
Suppose the cursor runs off the screen. If it was moving quick, it
might be 100 lines off-screen. If it was moving slow, it might be
just a few lines off-screen, before scrolling takes place.
The limit says how many lines does Emacs have to scroll. If the
cursor is further off, then Emacs doesn't scroll, it recenters.
At least that's my poor memory from the time when somebody else (Eli
or Stefan?) explained the issue. I never thought about it much,
except that I learned to set scroll-conservatively to a high value.
But now I find that the docstring of scroll-conservatively is, err,
suboptimal. So IWBNI somebody who groks this could explain it better.
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: scrolling
2003-08-08 2:24 scrolling schaecsn
` (3 preceding siblings ...)
2003-08-08 18:57 ` scrolling Kai Großjohann
@ 2003-08-16 14:02 ` Alexander Nikolov
4 siblings, 0 replies; 21+ messages in thread
From: Alexander Nikolov @ 2003-08-16 14:02 UTC (permalink / raw)
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?
Am I missing something or can't you just C-u 1 C-v?!
--
export AUTHOR=Alex\ Nikolov
echo $AUTHOR
^ permalink raw reply [flat|nested] 21+ messages in thread
* scrolling
@ 2012-11-09 19:11 drain
2012-11-09 19:52 ` scrolling Doug Lewan
0 siblings, 1 reply; 21+ messages in thread
From: drain @ 2012-11-09 19:11 UTC (permalink / raw)
To: Help-gnu-emacs
Any Emacs Lisp suggestions on scrolling by paragraph?
The following code could be easily adapted if forward / backward
paragraph returned line numbers:
(defun gcm-scroll-up (&optional arg)
(interactive "P")
(if arg
(scroll-down arg)
(scroll-down 1)))
--
View this message in context: http://emacs.1067599.n5.nabble.com/scrolling-tp269271.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: scrolling
2012-11-09 19:11 scrolling drain
@ 2012-11-09 19:52 ` Doug Lewan
0 siblings, 0 replies; 21+ messages in thread
From: Doug Lewan @ 2012-11-09 19:52 UTC (permalink / raw)
To: drain, Help-gnu-emacs@gnu.org
Consider using `line-number-at-pos'.
> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of drain
> Sent: Friday, 2012 November 09 14:11
> To: Help-gnu-emacs@gnu.org
> Subject: scrolling
>
> Any Emacs Lisp suggestions on scrolling by paragraph?
>
> The following code could be easily adapted if forward / backward
> paragraph returned line numbers:
>
> (defun gcm-scroll-up (&optional arg)
> (interactive "P")
> (if arg
> (scroll-down arg)
> (scroll-down 1)))
>
>
>
>
> --
> View this message in context:
> http://emacs.1067599.n5.nabble.com/scrolling-tp269271.html
> Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 21+ messages in thread
* scrolling
@ 2011-04-01 13:19 Mario Lassnig
0 siblings, 0 replies; 21+ messages in thread
From: Mario Lassnig @ 2011-04-01 13:19 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
how can I prevent that mwheel-scroll goes beyond the end of the file?
Meaning... I want to scroll down in a document with the wheel,
and I want the last line of the document to stay at the bottom of
the frame.
(so, in a sense what next-line-add-newlines nil does...)
Thanks,
Mario
^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <mailman.8812.1056799237.21513.help-gnu-emacs@gnu.org>]
* Scrolling
@ 2003-06-28 11:01 K T Ligesh
0 siblings, 0 replies; 21+ messages in thread
From: K T Ligesh @ 2003-06-28 11:01 UTC (permalink / raw)
Hi,
I am trying to set the scroll properties such that when the point moves out of screen it will be repositioned at the top of the screen rather than the middle (which is how it is currently set)
I tried setting values for scroll-up-aggressively to 0.1 1 etc. But it did not produce any effect...
Any help would be appreciated...
thanks.
--
:: Ligesh :: http://ligesh.com :: http://lxlabs.com ::
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2012-11-09 19:52 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` scrolling upro
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).