0

I have a function key bound to the command buffer-menu-other-window. But sometimes when I hit that key, while I am editing file foo.py, file foo.py appears at the bottom of my buffer list instead of the top, which is a real pain.

[The same thing happens when I type C-x C-b, which is bound to command list-buffers. As far as I can see, buffer-menu-other-window is an old name for list-buffers.]

This problem appears (apparently) randomly, and then does not go away until I quit emacs and restart it. So I assume I have accidentally set something. But is there a way to fix this without quitting and restarting emacs?

Peter B
  • 181
  • 4
  • A user cannot entirely control the order in which buffers appear in the global buffer-list or the frame-local buffer-list. Consider keeping a separate list and organize it in the manner desired, refreshing it as needed and removing buffers that are dead. Alternatively, consider a different method of organization such as alphabetical, or alphabetical plus additional criteria such as major-mode. To have an idea how to organize buffers using a separately maintained list, Alp Aker has a library called `frame-buffs` and the custom list is imbeded as a frame parameter; i.e., frame-local lists. – lawlist Apr 28 '22 at 15:29
  • 1
    I switched to `ibuffer` and never looked back. See e.g. https://emacs.stackexchange.com/questions/20187/organize-the-buffer-list – NickD Apr 28 '22 at 19:38
  • @NickD ibuffer is certainly preferable. If you give that as an answer I will mark is as best (unless someone else answer very soon, which doesn't look like happening). – Peter B May 05 '22 at 04:43
  • Update: `ibuffer` occasionally stops working for no apparent reason, i.e. it stops updating; which is even more annoying than the problem I originally asked about! So after 3 months trying it, I'm going back to `buffer-menu` / `buffer-menu-other-window` – Peter B Aug 03 '22 at 00:53

0 Answers0