Emacs navigation in new versions acts like Notepad
Asked Answered
V

2

8

This is a bit difficult to explain, so please bear with me.

I am running emacs 23.0.60.2 (from CVS) in order to have truetype support. (in case anyone wonders why I'm running the bleeding edge). I'm experiencing some oddness in navigation within documents with this version that I want to have STOP.

When a window is narrow enough that a long line wraps, it used to be that navigating down one line in the text would move the cursor to the next literal line in the file at the same offset into the line. Now, however, the cursor is moved to the next logical line in the window -- which is the continuation of the current line -- at the same relative offset from the window edge. Basically, before it was emacs-like and now it's notepad-like. I don't want notepad-like behaviour.

Does anyone know how to turn this off? Bonus points if you know how to turn it off in .emacs in such a way as to have my .emacs continue to work with emacs 21-22 as well :)

Thanks!

Velarize answered 5/2, 2009 at 13:49 Comment(0)
A
10

Try to put (setq line-move-visual nil) in the .emacs file.

Abeokuta answered 5/2, 2009 at 13:58 Comment(2)
visual-line-mode does not turn it off. However, (setq line-move-visual nil) did. Thanks!Velarize
Oh, thanks. I've edited the entry so that it only shows the correct way :)Abeokuta
C
5

I can't answer the main question, but the bonus question is easy:

(if (>= emacs-major-version 23) 
    ... )

Unfortunately, if you want to be more specific than that (e.g., you want exactly version 23.0.60.2) you'll have to parse emacs-version, which might look something like

"GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.14.3) of 2008-10-13 on rothera, modified by Debian"

Also, if you're running a Debian-based distro, look at the emacs-snapshot-gtk package—the edge might bleed a little less.

Candor answered 5/2, 2009 at 14:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.