I tried C-u 1 C-v, which based on the documentation should repeat C-v one time. Unfortunately, it only ends up scrolling a line instead of a screenful.

Any guidance appreciated.

  • The sentence fragment "... it ends up deleting sections of the buffer" means that portions of the buffer are being modified / removed; e.g., the buffer had 100 lines initially and now only has 25 lines. If this is not what was meant, please consider editing the question to make better sense. – lawlist May 18 '19 at 20:33

You should take a look at Scrolling in the Emacs Manual.

Supplying a prefix argument to C-v ("page down") or M-v ("page up") scrolls your page that number of lines, not that number of "pages".

The number of lines of overlap left by these scroll commands is controlled by the variable next-screen-context-lines, whose default value is 2. You can supply the commands with a numeric prefix argument, n, to scroll by n lines; Emacs attempts to leave point unchanged, so that the text and point move up or down together. C-v with a negative argument is like M-v and vice versa.

C-u 1 C-v should not have modified your buffer at all. It should have moved your text up one line relative to the window. (ie If line #1 was at the top of the window, line #2 should be at the top.)

If it's modifying your buffer, you have another problem going on. Make sure C-v is calling scroll-up-commnad by doing C-h k C-v, to show the help of the function that is currently bound to C-v.

| improve this answer | |
  • Thanks, it was indeed scrolling by a line. – Nick May 18 '19 at 22:31
  • Neither C-v nor M-v scrolls a page at a time. They scroll (roughly) a screenful at a time. Emacs has paging commands, to move to the next new-page (form-feed) character, C-l. They are bound to C-x ] (forward-page) and C-x [ (backward-page). The question and answer should be edited to not speak of "page" in this context. – Drew May 18 '19 at 23:16
  • Note the quotes around the references to “page”. – nega May 19 '19 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.