There was only one thing wrong with the code you tried, in terms of making the window dedicated:
(set-window-dedicated (selected-window) t)
The function is set-window-dedicated-p, not set-window-dedicated. Try again, without the typo:
(set-window-dedicated-p (selected-window) t) (set-window-dedicated-p (selected-window) t) That will prevent both you and Emacs from using the window for another buffer. For example, C-x b will raise an error.
To prevent automatic splitting of the window, you can do this:
(set-frame-parameter nil 'unsplittable t) (set-frame-parameter nil 'unsplittable t) That will not prevent you from splitting the window, e.g. using C-x 2, but it will prevent Emacs from splitting it automatically.