From b349dd3473a47ec9fad401a726df9418b45c9153 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 7 Aug 2018 14:44:10 +0200 Subject: [PATCH] ui/popup: respect org-src-window-setup --- modules/ui/popup/+hacks.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 113cd354c..212da8d61 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -232,10 +232,9 @@ the command buffer." (defun +popup*org-src-pop-to-buffer (orig-fn buffer context) "Hand off the src-block window to the popup system by using `display-buffer' instead of switch-to-buffer-*." - (if +popup-mode - (if (eq org-src-window-setup 'switch-invisibly) ; for internal calls - (set-buffer buffer) - (display-buffer buffer)) + (if (and (eq org-src-window-setup 'other-window) + +popup-mode) + (pop-to-buffer buffer) (funcall orig-fn buffer context))) (advice-add #'org-src-switch-to-buffer :around #'+popup*org-src-pop-to-buffer) (setq org-src-window-setup 'other-window)