diff options
author | Eric S Fraga <e.fraga@ucl.ac.uk> | 2019-07-11 10:24:15 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-08-17 15:26:32 +0200 |
commit | cfe4598aa1524d0b315b8fee0060585640403bc0 (patch) | |
tree | 0604b841f959f4b8830f963468cc98d731668cc5 | |
parent | 9e083fdf428f2deffbb2187974a6fb410a78e4cd (diff) | |
download | org-mode-cfe4598aa1524d0b315b8fee0060585640403bc0.tar.gz |
Add split-window-right option for editing source blocks
* org-src.el (org-src-window-setup, org-src-switch-to-buffer): Added
new split-window-right option which splits horizontally.
This has been motivated by the increasing use of wide monitors.
-rw-r--r-- | lisp/org-src.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el index a83942f..9134d5b 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -152,6 +152,8 @@ 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. +split-window-right Show edit buffer to the right of 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, @@ -162,6 +164,7 @@ other-frame Use `switch-to-buffer-other-frame' to display edit buffer. :type '(choice (const current-window) (const split-window-below) + (const split-window-right) (const other-frame) (const other-window) (const reorganize-frame))) @@ -793,6 +796,11 @@ Raise an error when current buffer is not a source editing buffer." (delete-window) (select-window (split-window-vertically))) (pop-to-buffer-same-window buffer)) + (`split-window-right + (if (eq context 'exit) + (delete-window) + (select-window (split-window-horizontally))) + (pop-to-buffer-same-window buffer)) (`other-frame (pcase context (`exit |