Hi, sorry I missed this thread in the peri-holiday rush, just want to say thank you all for ironing out the difficulties arsing from that change earlier. On Tue, Jan 7, 2020 at 4:06 AM Nicolas Goaziou wrote: > Hello, > > Jack Kamm writes: > > > Attached is a patch to restore the window configuration after exiting an > > org source buffer, when org-src-window-setup is one of reorganize-frame, > > split-window-below, or split-window-right. > > Thank you for the patch! Some comments follow. > > > @@ -156,8 +156,7 @@ split-window-right Show edit buffer to the right of > the current window, > > keeping all other windows. > > other-window Use `switch-to-buffer-other-window' to display edit > buffer. > > reorganize-frame Show only two windows on the current frame, the > current > > - window and the edit buffer. When exiting the edit > buffer, > > - return to one window. > > + window and the edit buffer. > > other-frame Use `switch-to-buffer-other-frame' to display edit > buffer. > > Also, when exiting the edit buffer, kill that > > frame." > > It would be useful to also explain what happens when the value is > `reorganize-frame', `split-window-right', or `split-window-right', e.g., > that previous window configuration is restored. > > > + (when org-src--saved-temp-window-config > > + (set-window-configuration org-src--saved-temp-window-config) > > + (setq org-src--saved-temp-window-config nil)))) > > It may be useful to wrap `set-window-configuration' within > `unwind-protect' so we can still reset the > `org-src--saved-temp-window-config' variable even though something went > wrong. > > WDYT? > > Regards, > > -- > Nicolas Goaziou > >