🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3960

Re: cursor movement question in emacs

#3960
From: Francisco Solsona
Date: Thu, 13 Nov 1997 00:00
37 lines
2163 bytes
ibelooze@runet.edu (Ilya) writes:

>  OK, I have been  using emacs for 2 years,  but can not  figure out how  to
>  move several screens at a time.
> 
>  I thought that  giving  M-n argument to  a   command would make it  do  it
>  several times.  So you want to move 10  lines down, you  hit M-10 C-n. The
>  comand to move down  one screen is C-v. So  to move down 10 screens (about
>  400  lines) would be M-10 C-v.   However, when I try  that it only moves n
>  lines! what is going on and why is this happening?! 

	This is happening because `C-v' with no argument takes the las two
lines at the bottom of the buffer (or as many as the variable
`next-screen-context-lines' tells it to) and puts them at the top. If this
command (scroll-up) receives a numeric argument (M-n or C-u n) scroll text
upward `n' lines... some other commands work like this too. 

> What is the equivalent of vi's 10 C-f command?

	I don't know if there is such a command. Actually, I don't think
so!, but, hey we can make one :)

(defun scroll-n-windows (n)
  (interactive "p")
  (when n
    (scroll-up (* (window-height) n)))
  (scroll-up))

just make the appropriate binding (i.e. to C-v), but I don't find it useful
at all, I mean if I want to move so many lines, then I'd rather use: M-n C-n.

Anyway... cheers,
Francisco

-- 
Who's gonna risk his life in your bed like I do?
Technical Details
Message-ID: <ud7pvo4tf36.fsf@kufi.cs.utexas.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <64g45t$gm7@newslink.runet.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102b9a,c86cae16a09fdd56
X-Google-Attributes: gid102b9a,public
X-Google-Thread: 103b8b,c86cae16a09fdd56
X-Google-Attributes: gid103b8b,public
X-Google-Thread: 107393,c86cae16a09fdd56
X-Google-Attributes: gid107393,public
From: Francisco Solsona <solsona@cs.utexas.edu>
Subject: Re: cursor movement question in emacs
Date: 1997/11/13
Message-ID: <ud7pvo4tf36.fsf@kufi.cs.utexas.edu>
X-Deja-AN: 289379553
Distribution: inet
References: <64g45t$gm7@newslink.runet.edu>
Mail-Copies-To: never
X-Complaints-To: usenet@cs.utexas.edu
X-Trace: news.cs.utexas.edu 879472502 9422 solsona 128.83.144.68
Organization: Computer Sciences UT at Austin
Newsgroups: comp.editors,comp.emacs,gnu.emacs.help