* [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below
@ 2019-01-22 17:03 Daniel Kraus
2019-01-23 14:32 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kraus @ 2019-01-22 17:03 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
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`.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below --]
[-- Type: text/x-patch, Size: 966 bytes --]
From 7b3df7891d7c8ecdb489edda0e908a306090ebfc Mon Sep 17 00:00:00 2001
From: Daniel Kraus <daniel@kraus.my>
Date: Tue, 22 Jan 2019 16:46:34 +0000
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-23 14:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22 17:03 [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below Daniel Kraus
2019-01-23 14:32 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).