Re: [O] [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below

2019-01-23 Thread Nicolas Goaziou
Hello,

Daniel Kraus  writes:

> This fixes a bug that got introduced in 819e98afd where you end up with
> 3 split windows if you exit an org source buffer with your
> `org-src-window-setup` function set to `split-window-below`.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below

2019-01-22 Thread Daniel Kraus
This fixes a bug that got introduced in 819e98afd where you end up with
3 split windows if you exit an org source buffer with your
`org-src-window-setup` function set to `split-window-below`.

>From 7b3df7891d7c8ecdb489edda0e908a306090ebfc Mon Sep 17 00:00:00 2001
From: Daniel Kraus 
Date: Tue, 22 Jan 2019 16:46:34 +
Subject: [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below

* lisp/org-src.el: (org-src-switch-to-buffer): Delete window when
exiting source buffer instead of splitting it again.
---
 lisp/org-src.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index c27a99114..d261a2369 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -789,7 +789,9 @@ Raise an error when current buffer is not a source editing buffer."
 (`other-window
  (switch-to-buffer-other-window buffer))
 (`split-window-below
- (select-window (split-window-vertically))
+ (if (eq context 'exit)
+	 (delete-window)
+   (select-window (split-window-vertically)))
  (pop-to-buffer-same-window buffer))
 (`other-frame
  (pcase context
-- 
2.20.1