Better control over Emacs windows
Asked Answered
S

2

9

I spend a lot of my time in emacs, and for the most part it's wonderful. But one thing really drives me nuts when I'm deep in it, and that's control over which window various new buffers are opened in. When I do find-file, it always opens in the current window, and this is what I like. But tons of other modes like to split my windows for me, change the layout, and do various other things that annoy me. For example running M-x manual-entry seems to have no rhyme or reason about where it opens the manpage, and various org-mode commands do the same thing, closing windows I want to keep open, etc. I don't like having to redo my layout everytime I want to look at my org agenda or open a manpage.

In short, is there anyway to globally control which windows are used for modes that want to open in a window other than the current one? Can I direct them more easily? Or will I have to hack each mode to act the way I want it to?

Sheepherder answered 26/2, 2009 at 17:8 Comment(0)
S
8

Try Winner mode:

http://www.emacswiki.org/emacs/WinnerMode

It provides an undo/redo for changes to the window configuration.

Schechinger answered 26/2, 2009 at 17:49 Comment(1)
Not perfect, but is actually exactly the minor mode hack I was imagining writing to get around this problem. Thanks!Sheepherder
S
2

This question has always bugged me too. I found this:

http://www.gnu.org/software/emacs/elisp/html_node/Choosing-Window.html

It looks like you can use (setf pop-up-frames t) to make stuff show up in a new frame.

Also, it looks like you can use display-buffer-function to override the display function (how buffers are chosen.) Of course, you'd have to be good at elisp.

Selfregulating answered 26/2, 2009 at 17:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.