Magit status used to create a buffer with the buffer name magit: repo name. I recently upgraded Spacemacs and the Magit status buffer started to disappear whenever its window was not visible, and it doesn't show up in my buffer list.

I can keep it by renaming the buffer, but that's pretty annoying.

How can I debug this?

  • Same issue here. Has anyone found a way to keep the magit-status buffer? I started having this issue after migrating to Spacemacs
    – ipocentro
    Commented Oct 4, 2021 at 13:49
  • Does it happen from emacs -Q? If not, maybe it's worth report it to Spacemacs. Commented Oct 4, 2021 at 14:04
  • Just to be sure; which buffer list? The list shown by SPC b b, or the actual buffer list (printed with M-: (buffer-list))? Could you try to first do M-: (setq magit-buffer (current-buffer)) in the magit-status buffer and then, without killing the magit-status buffer, but making it non-visible, do M-: (memq magit-buffer (buffer-list)) from another buffer. If the magit-status buffer really gets killed, then open an issue at Spacemacs (although I can not reproduce the behavior here). Commented Oct 5, 2021 at 4:54

1 Answer 1


I was having this issue, and it ended up being because of the value in spacemacs-useless-buffers-regexp, which by default for me was "magit-.*: .*" "magit: .*"

Here's a link to the (brief) FAQ about changing it, but this GitHub issue does a good job of explaining the situation and has lots of links to other details about it.

Using these instructions from the GitHub issue worked for me to remedy the situation. (Copied below)

voidfoo commented on Feb 19, 2021

(setq spacemacs-useless-buffers-regexp '("magit-.*: .*")

in my dotspacemacs/user-config

  • 1
    Assuming I've understood correctly, you may (or may not) prefer (setq spacemacs-useless-buffers-regexp (delete "magit: .*" spacemacs-useless-buffers-regexp)) so that rather than clobbering the whole list, you're just removing the one value you didn't want. That would make a difference if, in future, spacemacs adds other default values to that list.
    – phils
    Commented Apr 11 at 0:17
  • That sounds like a good option @phils. Thanks!
    – Jono Job
    Commented Apr 11 at 22:50

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.