From 762f6c06621e12c98031363fe3e70345e342ffeb Mon Sep 17 00:00:00 2001 From: stardiviner Date: Tue, 13 Mar 2018 01:23:52 +0800 Subject: [PATCH] org-src.el: (org-src-window-setup) support open edit src window below. TINYCHANGE --- etc/ORG-NEWS | 2 ++ lisp/org-src.el | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index da189eed5..10687ba83 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -107,6 +107,8 @@ document, use =shrink= value instead, or in addition to align: #+END_EXAMPLE ** New features +*** Add support for open src block in below window +Set option ~org-src-window-setup~ to ~'split-window-below~. *** Add support for links to LaTeX equations in HTML export Use MathJax links when enabled (by ~org-html-with-latex~), otherwise add a label to the rendered equation. diff --git a/lisp/org-src.el b/lisp/org-src.el index dfa2ae3de..5d3c2e538 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -155,6 +155,8 @@ Possible values for this option are: current-window Show edit buffer in the current window, keeping all other windows. +split-window-below Show edit buffer below the current window, keeping all + other windows. other-window Use `switch-to-buffer-other-window' to display edit buffer. reorganize-frame Show only two windows on the current frame, the current window and the edit buffer. When exiting the edit buffer, @@ -164,6 +166,7 @@ other-frame Use `switch-to-buffer-other-frame' to display edit buffer. :group 'org-edit-structure :type '(choice (const current-window) + (const split-window-below) (const other-frame) (const other-window) (const reorganize-frame))) @@ -746,6 +749,9 @@ If BUFFER is non-nil, test it instead." (`current-window (pop-to-buffer-same-window buffer)) (`other-window (switch-to-buffer-other-window buffer)) + (`split-window-below + (select-window (split-window-vertically)) + (pop-to-buffer-same-window buffer)) (`other-frame (pcase context (`exit -- 2.16.2