I am a recent newcomer to emacs, and I have my screen split into 4 windows in a grid arrangement. I'm having some problems using Magit, which is that it spawns (seemingly arbitrarily) in one of the 4 windows, and on completion of the task, it deletes the window it spawned in. (Making the layout 1x2 with one of the windows taking the space of two.)

What I'd like in terms of workflow, is that when I want to use Magit, I would navigate to the window I want Magit to spawn in, press C-x g, and for the window to appear in the selected buffer, then once my work is complete and magit-mode goes away, I would like it to go back to the state it was before being called.

How would I go about doing this?


1 Answer 1


Sounds like you want to M-x customize magit-bury-buffer-function and set it to magit-restore-window-configuration (which my manual claims is the default, but that seems not to be true).

  • That seems to have fixed it! Thanks! Apr 5, 2022 at 18:36

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .