I like to create a small ansi-term window at the bottom of my emacs frame, so if I'm editing two files "A" and "B", my emacs frame would look like this:
+------+------+ | | | | A | B | | | | +------+------+ | ansi-term | +-------------+ I have a function & keybinding to create / remove the ansi-term window as needed. When I have it open, however, emacs has an annoying tendency split the ansi-term window in particular when creating a new window. For example, if I try to use C-h f to describe a function, emacs decides the best way to split my windows is to make it look like:
+------+------+ | | | | A | B | | | | +------+------+ | ansi | help | +-------------+ Which is the worst possible outcome. I'd be happy if either "A" or "B" were split, or if it simply opened "help" in which ever "A" or "B" I'm not working in. Is there any way to alert emacs that I never want the "ansi-term" window split? I assume this must be possible, since NeoTree seems to create an un-splittable window.
So far, I've found the following related functions, that don't quite do what I want:
(set-window-dedicated-p window t)- This makes it so emacs can't take over the window, but doesn't affect whether or not it's splittable(set-frame-parameter nil 'unsplittable t)- This seems like it makes all windows in a frame unsplittable, not just the one I want.split-window-preferred-function- Would allow me to write my own algorithm for determining how to split windows. I could probably force this to do what I want, but I don't really want to override this behavior for all of emacs, just this one window.
Is there a simple way to make it so my ansi-term window in particular is never split?
window-splittable-p. Does the information there solve your problem?