From 362a45ff172af3f49050964aa8534d11374934ca Mon Sep 17 00:00:00 2001 From: Tom Gillespie
Date: Sun, 16 Feb 2020 19:21:16 -0800 Subject: [PATCH] org-src: Add option to restore window configuration after edit * lisp/org-src.el: Add an option to restore the previous window configuration after exiting from editing a source block. The variable is called `org-src-window-restore' and is only relevant when `org-src-window-setup' is set to `reorganize-frame'. This commit retains the default behavior in version 9.3 while restoring the old behavior behind a custom variable, it effectively reverts 819e98afd018cad3c13fd58bfcbd979ab36dfbc7 and adds an option to reenable the old behavior. --- lisp/org-src.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 7876deaba..f8f236ebd 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -169,6 +169,12 @@ other-frame Use `switch-to-buffer-other-frame' to display edit buffer. (const other-window) (const reorganize-frame))) +(defcustom org-src-window-restore nil + "Non-nil means that org mode will restore the layout of the windows +that was present before the org-src window was initially opened. This +option is only involved if `org-src-window-setup' is set to +`reorganize-frame'") + (defvar org-src-mode-hook nil "Hook run after Org switched a source code snippet to its Emacs mode. \\