About a year ago change 819e98afd018cad3c13fd58bfcbd979ab36dfbc7 was checked in
to remove code that restored window configuration when =org-edit-src-exit=
finished. The net result is af if =C-x 1= is called to remove all windows except
the org buffer just edited. This is very inconvenient.

Why not call =winner-undo= to restore window configuration as shown here?

#+begin_src diff
>From bd0a2abaa8097338d7f33c7ca9a1d45f5da67e7a Mon Sep 17 00:00:00 2001
From: kimr <k...@synopsys.com>
Date: Sat, 14 Dec 2019 10:59:00 -0800
Subject: [PATCH] restore window config by calling winner-undo

 lisp/org-src.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 5e50a1b4..c8c30889 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -1182,7 +1182,8 @@ Throw an error if there is no such buffer."
        (write-back (org-src--goto-coordinates coordinates beg end))))
     ;; Clean up left-over markers and restore window configuration.
     (set-marker beg nil)
-    (set-marker end nil)))
+    (set-marker end nil)
+    (winner-undo)))
 (provide 'org-src)

For now I'm using the following advice do the same thing.

#+begin_src elisp
(defadvice org-edit-src-exit (after restore-window-config activate)

Reply via email to