🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Ilya Thu, 13 Nov 1997 00:00
cursor movement question in emacs
#3959
Author: Ilya
Date: Thu, 13 Nov 1997 00:00
17 lines
1131 bytes


 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?! What is the equivalent
 of vi's 10 C-f command? 

 Thanks a lot

 Ilya
 
Re: cursor movement question in emacs
#3960
Author: 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?
Re: cursor movement question in emacs
#3961
Author: James Hu jxh
Date: Fri, 14 Nov 1997 00:00
23 lines
1790 bytes
On 13 Nov 1997 23:57:49 GMT, Ilya <ibelooze@runet.edu> wrote:
> 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?! What is the equivalent of vi's 10 C-f command?

The documentation for scroll-up and scroll-down clearly state that
the argument is the number of lines.  If no argument, then it is a
single screen.  Fortunatly, Emacs provides an easy way to enter a big
number without resorting to typing in the number itself.  The `universal
argument', C-u, corresponds to a power of 4 for functions wanting a
numeric argument.

So, if you just want to jump down by 256 lines, do this by:
C-u C-u C-u C-u C-v

-- 
James C. Hu <jxh@cs.wustl.edu>       Computer Science Doctoral Student 
http://www.cs.wustl.edu/~jxh/        Washington University in Saint Louis
>>>>>>>>>>>>> I use *SpamBeGone* <URL:http://www.internz.com/SpamBeGone/>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads