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.
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.