I think you are mixing a buffer point with a window point. If you want to move the cursor to some window with the image "foo", you need to select thiswindow when you execute goto-char, or you need to use set-window-point. In the general case, the buffer has N + 1 points (one is its own, and N is for N windows displaying the buffer).
source
share