Evaluate the form below, the deleted image remains displayed partially in the window. In my environment, (window-pixel-height)=>560, (frame-char-height)=>16. The attached image is the screenshot of the result. (let* ((buf (generate-new-buffer "tmp")) (w 512) (h 512) (pbm (concat (format "P4\n%d %d\n" w h) (make-string (* (/ w 8) h) ?U)))) (switch-to-buffer buf) (dotimes (i 50) (insert-char ?X i) (insert ?\n)) (goto-char (point-min)) (redisplay t) (insert-image (create-image pbm 'pbm t :scale 1)) (redisplay t) (delete-char -1))