0

Since moving to Doom emacs and Centaur tabs, I have an issue I can't seem to solve. If I have say two tabs/buffers open in the order A-B and am visiting A. I open another buffer C and am visiting it. Buffer list/tabs look like A-C-B. If I kill buffer C, I am now visiting buffer B. I always want to be visiting the previous buffer I was in when I opened a buffer (in this case, A). This only happens when there is a buffer/tab to the "right" of the new buffer I open. It is driving me mad. It is particularly annoying in dired mode when I open a file to have a quick look, kill it and then I'm not back in the dired buffer but some other buffer to the "right". It must be something to do with centaur tabs perhaps as it didn't do this before I switched to Doom emacs.

1
  • 1
    The same scenario in vanilla Emacs produces C-A-B for the buffer list and when I kill C, I am back in A. So you are probably right about Doom/Centaur tabs (or something else). Start with vanilla Doom and no add-ons and if that works, add Centaur tabs and try with it. If it still works, then you'll have to go through all your add-ons systematically, perhaps by bisecting your init file (although I know almost nothing about Doom, so take this with a grain of salt).
    – NickD
    Commented Feb 22 at 16:38

1 Answer 1

1

Found the culprit. Centaur tabs adds something to kill-buffer-hook. Putting this in my config stops it doing what it's doing:

(remove-hook 'kill-buffer-hook 'centaur-tabs-buffer-track-killed)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.