简体   繁体   中英

get emacs 23 buffer-list behavior in emacs 24.2

I just upgraded emacs from 23.4 to 24.2 (on 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.

In 23.4 if I had buffer "x" open and opened up file "y", the buffer-list showed "y" before "x", meaning

  • while in buffer "x" Cx <left> ( previous-buffer ) switched to buffer "y"
  • while in buffer "y" Cx <right> ( next-buffer )switched to buffer "x"

This order would get changed when I used Cx b , but I was ok with that.

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). Neither behavior is expected by me. How can I get the 23.4 (and earlier) behavior back?

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.

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. You can also customize the value, instead of using setq .

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