(add-to-list 'display-buffer-alist
'("\\*sly-mrepl"
(display-buffer-at-bottom)
(window-height . 12)))
(add-to-list 'display-buffer-alist
'("\\*Calendar*"
(display-buffer-at-bottom)))
(add-to-list 'display-buffer-alist
'("\\*shell:"
(display-buffer-below-selected)
(window-height . 12)))
(add-to-list 'display-buffer-alist
'("\\magit:"
(display-buffer-same-window)))
(add-to-list 'display-buffer-alist
'("\\*Man"
(display-buffer-same-window)))
(add-to-list 'display-buffer-alist
'("\\*Help"
(display-buffer-same-window)))
(add-to-list 'display-buffer-alist
'("\\*helpful"
(display-buffer-same-window)))
this post was submitted on 17 Oct 2023
3 points (100.0% liked)
Emacs
313 readers
3 users here now
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
founded 1 year ago
MODERATORS
(add-to-list 'display-buffer-alist
'("\\*e?shell\\*"
(display-buffer-in-side-window)
(side . bottom)
(slot . -1) ;; -1 == L 0 == Mid 1 == R
(window-height . 0.33) ;; take 2/3 on bottom left
(window-parameters
(no-delete-other-windows . nil))))
(add-to-list 'display-buffer-alist
'("\\*\\(Backtrace\\|Compile-log\\|Messages\\|Warnings\\)\\*"
(display-buffer-in-side-window)
(side . bottom)
(slot . 0)
(window-height . 0.33)
(window-parameters
(no-delete-other-windows . nil))))
(add-to-list 'display-buffer-alist
'("\\*\\([Hh]elp\\|Command History\\|command-log\\)\\*"
(display-buffer-in-side-window)
(side . right)
(slot . 0)
(window-width . 80)
(window-parameters
(no-delete-other-windows . nil))))
(add-to-list 'display-buffer-alist
'("\\*TeX errors\\*"
(display-buffer-in-side-window)
(side . bottom)
(slot . 3)
(window-height . shrink-window-if-larger-than-buffer)
(dedicated . t)))
(add-to-list 'display-buffer-alist
'("\\*TeX Help\\*"
(display-buffer-in-side-window)
(side . bottom)
(slot . 4)
(window-height . shrink-window-if-larger-than-buffer)
(dedicated . t)))
I wanted to make the window management as simple as possible and created this package - https://github.com/FrostyX/current-window-only . Not everybody will like it but that's okay.
Mine is just the default nil
. I don't use any of the packages. But I prefer magit to be fullscreen and to restore back to where I was on quit:
(setq magit-display-buffer-function 'magit-display-buffer-fullframe-status-topleft-v1)
(setq magit-bury-buffer-function 'magit-restore-window-configuration)
I tried Magit full-screen but It wasnt restoring my previous windows. I didn't know about the bury buffer function so this helps me out a lot. Thanks!
I never took care of setting this aspect of emacs properly. Thanks a ton