Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "M-x magit" get a nice list of the status of the files in the current branch.

Except it will randomly split your frame and show up in a seemingly arbitrary location - often obscuring what you're working on. I find the whole layout system in Emacs completely chaotic. I guess it comes with the flexibility (VS a fixed system like most Ides) nor do I have any particular solution in mind

I'm curious if anyone has tamed the weird inconsistencies of how new frames (or is it windows? Can never keep the terms straight) pop up. For instance a CIDER error buffer shows up using some completely different black magic than magit



For magit, I like having it display full screen (deleting other windows), and then on quitting restore to the windows/splits I had before:

     (setq magit-display-buffer-function 'magit-display-buffer-fullframe-status-topleft-v1)
     (setq magit-bury-buffer-function 'magit-restore-window-configuration)

For more general display-buffer tweaks, OP has a whole article on it https://www.masteringemacs.org/article/demystifying-emacs-wi... (though for display-buffer I just stick to the defaults myself, never tried CIDER)


There is definitely a system to it. Something like "split at the longest side of the current window" or so. I have developed a feeling for where my magit buffer will show up. 95% of the time I am right and my eyeballs already move where it will appear. Anyway, if you want to get rid of some window/undo a split: C-x 0.


Add something like this?

    (add-to-list 'display-buffer-alist
          '("\\*Magit*\\*"
            (display-buffer-reuse-window display-buffer-in-direction
            (direction . bottom)
            (window . root)
            (inhibit-same-window . t)))*


This thread is on the "Mastering Emacs" book and from its author, on the topic of mastering Emacs window managements you can read this:

https://www.masteringemacs.org/article/demystifying-emacs-wi...

To be honest I've never played with this part of Emacs. The way I use it I'm fine with the default. But if not it's possible to take control of Emacs internal windows management.


I have my Emacs setup to never split anything and just use the whole frame (window). That also goes for things like helm. Instead of splitting I prefer to open multiple frames and let my window manager, manage them. This really improved my workflow.


How do I go about doing this ?

Seems potentially workable. Youd just jump back to the last buffer a lot of time, but that's quick and intuitivr.


(setq display-buffer-base-action '(display-buffer-same-window))


thank you ! I'll see how it goes. Hope it won't be too wonky.

Ex: In Magit when committing it now first shows a "changes" buffer that you have to kill and then you can get to the buffer where you write the commit message. Not a biggie but prolly breaks the original UI design


Same here, but I let most things replace the current buffer. Magit always fills the frame though.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: