Acebulf · 2022-04-15 17:10
Hello all!
I am having issues where emacs is breaking my programming flow by popping up new buffers in the wrong windows. Is there a package where I can decide what goes where?
Ideally, I'd like buffers to pop up in the active window, and some sort of functionality that allows me to easily move a buffer to a different window (like move the active buffer to the window on the left).
Does something like this exist, and if not, what are the alternatives?
Sea_Inevitable_5522 · 2022-04-15 18:23
I haven't used popper but its description sounds promising: https://github.com/karthink/popper
akirakom · 2022-04-15 18:51
I am currently using popper. It is useful. I once used shackle. You can pick whichever you want. Popper doesn't work great for a calendar window, but shackle does.
I would also suggest use of winner-mode. Whatever annoying thing happens, it is trivial if you can undo the window configuration quickly.
There are other useful packages such as windswap, ace-window, etc.
mmmnop000 · 2022-04-15 19:03
`ace-window` lets you move a buffer to another window among other features, you could also use `winner-mode` to undo window changes if you accidentally mess up your layout by opening a window, or e.g. if you accidentally delete all other windows
https://github.com/abo-abo/ace-window
https://www.emacswiki.org/emacs/WinnerMode
oldjawbone · 2022-04-15 19:13
Here are two great videos from Protesilaos Stavrou on this topic; highly recommended:
\- [Emacs: window rules and parameters (\`'display-buffer-alist' and extras)](https://www.youtube.com/watch?v=rjOhJMbA-q0)
\- [Emacs: buffer and window management](https://www.youtube.com/watch?v=xRm5SUf68pc)
Also highly recommend [ace-window](https://github.com/abo-abo/ace-window).
wysteriary · 2022-04-15 22:23
Are you invoking commands that pop up those new buffers? If so, and if you're using the new Emacs 28.1, invoking ``C-x 4 1`` (bound to ``same-window-prefix``) before running your intended command will force the output buffer of that command to always appear in the current window.
This feature is built into Emacs 28.1 with no external packages or additional configuration.
Illiamen · 2022-04-15 23:07
The built-in features for this are `display-buffer-alist` (https://www.gnu.org/software/emacs/manual/html_node/elisp/Choosing-Window.html)
and `windmove` (https://www.gnu.org/software/emacs/manual/html_node/emacs/Window-Convenience.html).
There are also packages that expand on these features.