简体   繁体   English

在emacs 24.2中获取emacs 23缓冲区列表行为

[英]get emacs 23 buffer-list behavior in emacs 24.2

I just upgraded emacs from 23.4 to 24.2 (on OS X). 我刚刚将emacs从23.4升级到24.2(在OS X上)。 I use emacs-starter-kit , but it doesn't appear to affect this behavior in 24.2 (I have it disabled at the moment), and I'm pretty sure I got my expected behavior in 23 before I started using it. 我使用emacs-starter-kit ,但它似乎并未影响24.2中的此行为(此刻我已将其禁用),并且我很确定在开始使用它之前,我已经在23中获得了预期的行为。

In 23.4 if I had buffer "x" open and opened up file "y", the buffer-list showed "y" before "x", meaning 在23.4中,如果我打开了缓冲区“ x”并打开了文件“ y”,则缓冲区列表在“ x”之前显示“ y”,这意味着

  • while in buffer "x" Cx <left> ( previous-buffer ) switched to buffer "y" 而在缓冲区“ x”中, Cx <left>previous-buffer )切换到缓冲区“ y”
  • while in buffer "y" Cx <right> ( next-buffer )switched to buffer "x" 而在缓冲区“ y”中, Cx <right>next-buffer )切换到缓冲区“ x”

This order would get changed when I used Cx b , but I was ok with that. 当我使用Cx b时 ,此顺序将被更改,但是我对此表示满意。

In 24.2 opening a file seems to sometimes reorder the buffer list and sometimes add the file after the current buffer in the buffer list (depending on the number of files open and the position of the current buffer when I ran Cx Cf to open the other file). 在24.2中,打开文件似乎有时会重新排序缓冲区列表,有时会在缓冲区列表中的当前缓冲区之后添加文件(取决于我运行Cx Cf打开另一个文件时打开的文件数和当前缓冲区的位置) )。 Neither behavior is expected by me. 我没有期望这两种行为。 How can I get the 23.4 (and earlier) behavior back? 如何获得23.4(或更早版本)的行为?

I've found the following commands, but they don't seem to work. 我发现以下命令,但它们似乎不起作用。

(setq Buffer-menu-sort-column nil)
(setq Buffer-menu-user-frame-buffer-list nil)

I know this seems minor, but I've trained myself over the past several years to expect a specific behavior from Cx <left> and Cx <right> and the new behavior is throwing me off. 我知道这似乎不太重要,但是过去几年我已经训练自己,期望Cx <left>Cx <right>有特定的行为,而新的行为使我无法接受。

You've misspelled the second variable name -- the command should be: 您拼错了第二个变量名称-命令应为:

(setq Buffer-menu-use-frame-buffer-list nil)

(That's -use- instead of -user- .) I don't know if it will do what you want, but it should at least have an effect. (这是-use-而不是-user- 。)我不知道它是否-user-您的要求,但是至少应该可以起作用。 You can also customize the value, instead of using setq . 您也可以自定义值,而不是使用setq

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

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