I guess, in cases where the buffer is not displayed, (goto-char pos)
might not always work as `set-window-point': a posterior
display of the buffer maybe doesn't show point at pos.
When a buffer is displayed in a window for the first time, the window's
point is initialized from the buffer's point, so it should work for
those cases. If the goto-char happens for a buffer that used to be
displayed in a window and later gets displayed again in that window, it
may be the case that we remember the old window-point somewhere and try
to return to that, indeed. Let's not worry about it for now.
Tho, maybe it would be a good idea to introduce a new function (not sure
how to call it: window-goto-char? set-buffer-window-point?) which would
work like set-window-point but takes a buffer as argument. After all,
it's a fairly common need, and if we ever want to fix the corner case
mentioned above, we could fix it there once and for all.