Dieter Wilhelm <[EMAIL PROTECTED]> writes:

> This is just a minor flaw, tumme doesn't fit an image into the
> *tumme-display-image* buffer when changing the size of the *tumme*
> buffer (the buffer displaying the thumbnails) before hitting RET on a
> thumbnail.
>
> Emacs -D -Q --fullscreen
> M-x tumme "some image dir"
> C---1-0 C-x ^ (negative argument)
> RET (on the first thumbnail)
>
> The image is only fitted to the display-buffer correctly at a
> subsequent RET.

Yeah, I have seen that sometimes too, and I just press RET one more
time to fix it :)

The reason the issue exist is that the code that figures out the
window size cannot come up with a correct size because the buffer is
not visible in a window yet.

Anyway, try this out:

(defun tumme-display-thumbnail-original-image (&optional arg)
  "Display current thumbnail's original image in display buffer.
See documentation for `tumme-display-image' for more information.
With prefix argument ARG, display image in its original size."
  (interactive "P")
  (let ((file (tumme-original-file-name)))
    (if (not (string-equal major-mode "tumme-thumbnail-mode"))
        (message "Not in tumme-thumbnail-mode")
      (if (not (tumme-image-at-point-p))
          (message "No thumbnail at point")
        (if (not file)
            (message "No original file name found")
          ;; Display buffer first, so that we can find out the
          ;; correct size of the window.
          (tumme-create-display-image-buffer)
          (display-buffer tumme-display-image-buffer)
          (tumme-display-image file arg))))))

Does this change work for you?

Not sure I like the fix though, I will think about it some more.

/Mathias



_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to