5

I think this is mostly just a question of how to word the question...

Prior to emacs 23.1, when pressing down-arrow or up-arrow the cursor would move up a whole line at a time even when that line was wrapped.

As of emacs 23.1, when pressing up or down-arrow at the head of a wrapped line, the cursor moves to the position within the same "line" which happens to fall beneath it's previous position. So instead of moving to the beginning of the next line, the cursor actually moves to character 81 (depending on the width of your buffer) within the same line.

I would like, very much, to restore the older behavior of always moving a whole line at a time.

  • 1
    Yes, this is one of those things that users now need to change, themselves, because Emacs Dev chose to change the default behavior. Too bad, IMHO. @kaushalmodi gives you the answer: M-x customize-option line-move-visual. – Drew Feb 6 '15 at 17:46
9

You need to modify the line-move-visual variable.

You need to set its value to nil if you want the up/down line navigation happen logically (not visually).

When line-move-visual is set to nil

▮his is a very very very very very long line
and it wrapped around here.
This is the next line

After hitting C-n (moving the cursor to the next line) ..

This is a very very very very very long line
and it wrapped around here.
▮his is the next line

When line-move-visual is set to t

▮his is a very very very very very long line
and it wrapped around here.
This is the next line

After hitting C-n (moving the cursor to the next line) ..

This is a very very very very very long line
▮nd it wrapped around here.
This is the next line
  • Very clear answer. – ericx Feb 6 '15 at 17:43

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.