[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tumme image size
From: |
Mathias Dahl |
Subject: |
Re: tumme image size |
Date: |
Mon, 17 Jul 2006 18:54:40 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
Dieter Wilhelm <address@hidden> 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
- tumme image size, Dieter Wilhelm, 2006/07/16
- Re: tumme image size,
Mathias Dahl <=
- tumme does not show image buffer [was: tumme image size], Dieter Wilhelm, 2006/07/17
- Re: tumme does not show image buffer, Mathias Dahl, 2006/07/18
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: tumme does not show image buffer, Dieter Wilhelm, 2006/07/21
- Re: tumme does not show image buffer, Mathias Dahl, 2006/07/21
- Re: tumme does not show image buffer, Mathias Dahl, 2006/07/21
- Re: tumme does not show image buffer, Dieter Wilhelm, 2006/07/22
- Re: tumme does not show image buffer, Mathias Dahl, 2006/07/22