Automatically open and close edamot buffer