简体   繁体   English

新版本中的Emacs导航就像记事本一样

[英]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. 我正在运行emacs 23.0.60.2(来自CVS)以获得truetype支持。 (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. 基本上,在它像emacs之前,现在它像记事本一样。 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 :) 如果您知道如何在.emacs中关闭它,以便让我的.emacs继续使用emacs 21-22,那么奖励积分:)

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 不幸的是,如果你想要更具体(例如,你想要完全版本23.0.60.2),你将不得不解析emacs-version ,这可能看起来像

"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. 另外,如果您正在运行基于Debian的发行版,请查看emacs-snapshot-gtk软件包 - 边缘可能会少一些。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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