Org-mode has a nice feature that allow us to edit source code within an org file, for more info check the docs. But it has a little annoying behavior after we are done editing a source block. It loses the previous window configuration and always closes all the windows except the org window. In the image below we can see this behavior: To solve this problem we can use a simple variable to store the current window configuration just before the source code edition buffer is opened and when it's ...