Use (fit-window-to-buffer) for error reporting.