Here's an alternative suggestion: juse use the scratch buffer.
Many users, I think, always have a scratch buffer open. If hycontrol-window-display-buffer runs out of buffers to display, instead of creating new, empty, useless buffers, it seems reasonable to default to displaying the scratch buffer. And if there's no such buffer, then fall back to the blank one.
So, in addition to a more useful name, I propose the following snippet for hycontrol-window-display-buffer:
(set-window-buffer window
(or buf
;; Out of buffers to display, display scratch buffer if it exists...
(get-buffer "*scratch*")
;; ...otherwise, a blank buffer:
hycontrol--blank-buffer))))
It just adds the single condition to the "or" to get the scratch buffer, and gracefully falls back to existing behavior if there's no scratch buffer.
Ceci n'est pas une .signature.