简体   繁体   中英

Emacs navigation in new versions acts like Notepad

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!

尝试将(setq line-move-visual nil)放在.emacs文件中。

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 (eg, 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM