Subject: Re: bug#8364: 24.0.9999; PATCH: Fit to width/height/page for doc-view.el

From: sho nakatani <[email-masked]>
Date: Wed, 30 Mar 2011 19:43:21 +0900

Hi Tassilo,

> The problematic issue was that the `new-slice' calculated by the
> `mapcar' contained floating point numbers, which are not allowed for
> slice specs.  I found out by using `edebug-defun' on
> `doc-view-insert-image'.

Wow! Thank you for the report. I didn't realized.

But your function doesn't work for some files.
I attached an example PDF file (written in Japanse).

(If you cannot see the attachment, download it from:
 https://github.com/laysakura/TheoryOfComputation/raw/master/main.pdf )

> One minor thing: I would prefer if your three original functions would
> respect the current slice if there is one, instead of adding a fourth
> function for that purpose.  Could you please make it that way?

It's easy! I'm making a new function just for a test purpose.
So soon after we get perfectly working function, I'll combine this feature
to `doc-view-fit-(width|height|page)-to-window' .

> And I'm especially pleased that my assumption of calculating the right
> scales of both image and slices out of the plain images without
> resorting to external tools turned out being right. ;-)

That's because your code have rigid basic functions :-)

Anyway, please tell me the result of test for the attachment
and give me any advice.

--
Sho Nakatani