I create a window with the following
(setq ook-window (display-buffer-in-side-window buffer '((side . bottom))))
(set-window-dedicated-p ook-window t)
But then when I go to the main window and press C-X 1, it closes my ook-window. What can I do to prevent this from happening so the window will only close when I choose?
From the documentation I would have thought setting it as dedicated should have done the trick, but it seems I am still missing something. I can see neo-tree does something similar, it only closes when I run neotree-toggle.
EDIT, to clarify
I want to bind a key (f9), so when I press f9 it will make the window appear and then the only way to make it dissappear is by pressing f9 again.