]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
mp-split-below mp-split-right
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 4 Sep 2022 14:07:46 +0000 (16:07 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 4 Sep 2022 14:07:46 +0000 (16:07 +0200)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 0484102e826264015a59efa13c5445ef30a71fe1..072c2c9985770dd433f09d18d244ea79002baf19 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -3626,6 +3626,24 @@ Right from [[https://gist.github.com/etherald/dcdcf579751c75a2c796][gisthub]]:
     (set-window-buffer (second (window-list)) buffer2))
 #+END_SRC
 
+https://www.masteringemacs.org/article/demystifying-emacs-window-manager
+
+#+begin_src emacs-lisp
+  (defun mp-split-below (arg)
+    "Split window below from the parent or from root with ARG."
+    (interactive "P")
+    (split-window (if arg (frame-root-window)
+                    (window-parent (selected-window)))
+                  nil 'below nil))
+
+  (defun mp-split-right (arg)
+    "Split window below from the parent or from root with ARG."
+    (interactive "P")
+    (split-window (if arg (frame-root-window)
+                    (window-parent (selected-window)))
+                  nil 'right nil))
+#+end_src
+
 * [[https://github.com/dotemacs/ipcalc.el][ipcalc]]
 #+BEGIN_SRC emacs-lisp
       (require 'ipcalc)